813 Commits

Author SHA1 Message Date
Jeff Sharkey
2fea92e6d9 Merge "Clear ident in dismissKeyguardOnNextActivity()." into jb-dev 2012-04-30 17:22:05 -07:00
Jeff Sharkey
7ffaa98539 Clear ident in dismissKeyguardOnNextActivity().
BaseStatusBar uses this to launch activities over the insecure
lockscreen, so clear identity.

Bug: 6414983
Change-Id: Idf578923285ee1344e6e13e7f51e17a5f2005c75
2012-04-30 16:59:05 -07:00
Adam Powell
9b2a0f167e Merge "Fix a bug with updating extras in a PendingIntent with an intent stack" into jb-dev 2012-04-30 16:04:11 -07:00
Dianne Hackborn
56385cc452 Fix issue #6111771: Run-time Restart observed when signing in with an existing account
Change-Id: Ic6defb598cb08f2728d99eed7d0b209c88dd1a49
2012-04-30 15:07:47 -07:00
Adam Powell
501d4a510f Fix a bug with updating extras in a PendingIntent with an intent stack
Change-Id: I52e2677635b588b7301dd938e1dd32f94241cf5a
2012-04-30 15:03:57 -07:00
Dianne Hackborn
ecc5a9cca0 Add new Activity.finishAffinity() method.
It's cool!

Change-Id: I9fdcd9535b7f1ca2b311d3a1b23e5d058977b095
2012-04-26 18:56:09 -07:00
Dianne Hackborn
4797d57bf3 Merge "Fix issue #6373340: Cannot unlock to app if app was the..." 2012-04-24 18:38:44 -07:00
Dianne Hackborn
1e88e98d7d Fix issue #6373340: Cannot unlock to app if app was the...
...foreground app when the device was put to sleep

This is because of activities being kept in the stopped state
while the lock screen is shown, so we never get to the point of
it becoming visible again to know to proceed.

Just at this point consider the lock screen hidden so the
activity can be resumed and run as normal; the whole point of
this is to soon hide the lock screen, anyway.

Change-Id: I3a713a2f87b8e4412ff66724c051f09a2675be00
2012-04-24 18:35:55 -07:00
Adam Powell
4bde4b9274 Merge "Check for valid records associated with activity tokens in ActivityManagerService up-navigation methods." 2012-04-24 17:25:25 -07:00
Dianne Hackborn
2ed9c20048 Merge "Add new signature-level permission to get details of tasks." 2012-04-24 15:42:26 -07:00
Dianne Hackborn
e29ccb0d67 am b3a76660: am 78e62111: am fee88fdb: Merge "Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode."
* commit 'b3a766600275a004dfa2423e87229082d7f1232b':
  Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode.
2012-04-24 14:51:21 -07:00
Dianne Hackborn
8238e717df Add new signature-level permission to get details of tasks.
Third party apps now can't get access to the extras of the
intents associated with tasks, to keep private data in them
from leaking out.

Change-Id: I95af9e181ac42557bc8b981807e7ddd266a88d0e
2012-04-24 14:27:02 -07:00
Adam Powell
b71a5bc02b Check for valid records associated with activity tokens in
ActivityManagerService up-navigation methods.

Silly monkeys.

Fixes bug 6328725

Change-Id: Ifec3f162bdfc2e7e872a689210752c0f6b9b0ab7
2012-04-24 14:20:57 -07:00
Dianne Hackborn
d0d7503fd3 Move handling of package changes to a background thread.
Helps get rid of some jank when installing applications.

Change-Id: I97d0022f82d67796e334d37086e5911dd6ca6b62
2012-04-19 23:12:09 -07:00
p13451
dbad287b62 Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode.
Step to Reproduce
1)	Turn off device’s screen. (Sleep mode)
2)	Kill any process.
A.	Engineer Version: kill [PID]
B.	User Version: am force-stop [Package Name]
3)	Foreground activity proceed [Resume] and [Pause] consecutively.

Reason: Since ICS version, activity goes to stopped status when screen turns off.
stopIfSleepingLocked( ) makes activity to stopped status but, pauseIfSleepingLocked( ) was used in GB
and, activity keep paused status and, this problem did not occur.
This change give effect to resuming activity when any process was killed.
Because, resume is proceed without exception for activity status.
The exception only filtered for [ActivityState.PAUSED] in sleep or shutdown mode.
and, resume complete flow when activity status was [ActivityState.STOPPED].

Solution for this issue:
We think that exception’s condition have to change if stopped activity status is intended in sleep mode.
According to activity life cycle, activity can not resume from stop status.

Also check [ActivityState.STOPPING]. :)

Change-Id: Icca3366ac30ffa3b18f6e2393e4d7309089ef26a
2012-04-20 09:21:08 +09:00
Jeff Sharkey
35be756030 Move SystemUI out of system UID.
Add permissions for various things it pokes.  Create new permission
to control launching non-exported activities from recents.  Hidden
API to relax WallpaperService checks.

Change-Id: I547fdcd7c213dd153ae101533ce7c56cd8f86a0d
2012-04-19 11:54:34 -07:00
Dianne Hackborn
7f58b95f7c Fix to custom scale animations.
These now do something reasonable when performing transitions
across two activities that are both on top of the wallpaper.

Fixed computation of the pivot point of the animations.

Fixed issue where the recents panel was considered a status
bar element for purposes of deciding if the animating elements
are obscured by the status bar, which would result in us not
running the animation correctly.

Change-Id: I4b9b588b80243463e6f087a9703ee886ee281630
2012-04-18 14:58:03 -07:00
Amith Yamasani
95a6a96e1c Fix an NPE when launching an activity that's not found.
Bug: 6356194
Change-Id: I66aeeda3ecab36a4aa32fb78c1d0559a73cd9a7a
2012-04-18 09:54:43 -07:00
Amith Yamasani
d95ce04bdc Merge "Make sure persistent processes are not replicated for secondary users." 2012-04-17 11:55:54 -07:00
Amith Yamasani
a4a54e2a5f Make sure persistent processes are not replicated for secondary users.
An intent is launched in a singleton process if the process is persistent
and the resolved activity/service/etc is not requested to run in a different
process.

Change-Id: I1463e73a76bc8bde4185f9cf4395edb47515841d
2012-04-17 11:41:30 -07:00
Dianne Hackborn
eabfb3a36e Add new scale-up window manager animation.
Like zoom thumbnail, but without the thumbnail.

Change-Id: I9486dd204398b87c9e70ff0d05d03f4a22449cd6
2012-04-16 17:32:50 -07:00
Dianne Hackborn
ff5b158f69 Keep activities stopped while the lock screen is up.
Tell the activity manager when the lock screen is shown, so it
can keep itself (mostly) in sleep mode during this time, having
the foreground actvities remain in their stopped state.

Change-Id: I71c86d3298f23a98014d7ae36fd540c9df9a64e6
2012-04-12 17:26:55 -07:00
Amith Yamasani
7463adacbd Make dumpsys activity services work again.
Due to the step to query the users, dumpsys was crashing when run
as non-root. Clearing the calling identity after checking perms
fixes this.

Bug: 6311443
Change-Id: I0b0bca5c7305cea19adc772b3bfec34c16bb24c4
2012-04-12 10:41:19 -07:00
Dianne Hackborn
2a854c13f8 Merge "Some small tweaks to improve memory management." 2012-04-10 15:25:43 -07:00
Dianne Hackborn
162bc0ea0d Some small tweaks to improve memory management.
We now allow processes that currently have stopping activities to
be managed as if they were done stopping, so that memory trimming
can be done before the process goes to the background.  Hopefully
this will reduce cases where the processes goes to the background
and immediately gets killed, but wouldn't have had to be killed if
it had a chance to trim its memory.

Also change window memory trimming to always do the aggressive
trimming when memory is critical, even if not on a low-end device.

And tweak web view trimming to not trim for foreground UI events.

Change-Id: I241b3152b52d09757bd14a202477cf69c9b78786
2012-04-10 14:43:58 -07:00
Jeff Brown
deb6ed8c2e Don't reuse StringBuilder outside of lock when dumping ANR.
The ANR dumping code was reusing the shared StringBuilder while
not holding the ActivityManagerService lock.  As a result, other
threads could sweep in and clobber the ANR information.
We don't want to hold the lock here, so just create a new StringBuilder.

Change-Id: I0d91af55f5c123102cfab2cd97035491efed59c0
2012-04-10 14:26:26 -07:00
Dianne Hackborn
b7943811a2 Merge "Fix issue #6242583: ResolverActivity is considered as home activity" 2012-04-06 17:53:59 -07:00
Dianne Hackborn
2d69d49d30 Fix issue #6242583: ResolverActivity is considered as home activity
Change-Id: Ib29908cdfcbbff769d12df1770264ad13ec5337b
2012-04-06 16:24:14 -07:00
Christopher Tate
bf64e70f9b Merge "Attribute alarm broadcast wakelocks to the sender" 2012-04-06 14:35:16 -07:00
Christopher Tate
c4a07d1caa Attribute alarm broadcast wakelocks to the sender
Wakelock usage for the purpose of sending an alarm broadcast is now
attributed to the application which posted the alarm, not to the OS.

Bug 5911317

Change-Id: I8cb79c3bd5db467388716ab68285f4ab0bfe468b
2012-04-06 14:23:12 -07:00
Dianne Hackborn
d3e677bc50 Dump KSM stats in the meminfo.
Change-Id: I077dcb137ed743ea10fde1dbba4e86c340dec432
2012-04-05 15:03:21 -07:00
Adam Powell
dd8fab2629 TaskStackBuilder and Activity navigation features for framework
Promote navigation helpers from the support library to the core
platform.

The support library's meta-data element has been replaced with a
first-class parentActivityName attribute. This attribute is valid
on both activity and activity-alias elements. An activity-alias
will inherit the target activity's parentActivityName if one is
not explicitly specified.

Automatic Up navigation for Activities

Add the public method onNavigateUp() to Activity. The default
implementation will use the metadata supplied in the manifest about an
activity's hierarchical parent (parentActivityName) to do the right
thing.

If any activities in the parent chain require special Intent
arguments, the Activity subclass should override onNavigateUp() to
properly implement Up navigation for the app, supplying such arguments
as needed.

If automatic Up navigation within the same task can't find an activity
matching the supplied intent in the current task stack, it will act as
an in-app "home" and return to the root activity (presumably the app's
front page) in that task. (From this state, pressing "back" with
default behavior will return to the launcher.)

Change-Id: If163e27e59587f7af36975a09c986cb117ec3bc6
2012-04-05 11:45:10 -07:00
Mike Lockwood
69ccdbd78a Merge commit 'bc52ca2'
Conflicts:
	services/java/com/android/server/am/ActivityManagerService.java

Change-Id: I6da33a191a4ac13d08d8350a432b205e3dff85da
2012-04-03 11:53:47 -07:00
Amith Yamasani
34db3d65d6 Fix a regression in activity manager regarding killing stopped processes.
Bug: 6275175
Change-Id: Ib1fa80cba9d21799f36fec999899e54a0fe8da51
2012-04-02 16:35:19 -07:00
Justin Koh
bc52ca2814 Stop ANR dialogs from appearing when ActivityManager dialogs should not be shown
Stop ANR dialogs from appearing on devices where the ActivityManager dialogs
should not be shown. Instead, kill the process. This is preferable because the
user can't actually do anything on the device.

TESTED = runs on device with that config, simulated ANR using test app.

Change-Id: I6267000afd12ef929f0c625220184c6ab0139552
2012-03-29 15:37:11 -07:00
Amith Yamasani
0184ce9295 Undo a previous change that's causing multi-user issues
Surgical hack for getting Settings to run multiple instances without
causing other system services/providers from doing the same.

Change-Id: Ic5dab61976a04c3012235299ba55edfcd8273dbb
2012-03-28 22:41:41 -07:00
Amith Yamasani
52f1d752f9 Show the current user in power menu
Shows a little indicator next to the current user in the power menu
when multi-user is enabled.

Fixed a bug where Settings was sometimes being launched in the wrong
process when there are 2 instances running.

Change-Id: Iaf2a00f6d1871fd2a88d8982439e445423bb2896
2012-03-28 18:19:29 -07:00
Amith Yamasani
8b5bce8d90 Merge "User management and switching" 2012-03-27 11:24:54 -07:00
Amith Yamasani
135936072b User management and switching
Broadcast intents that get sent out when users are added/removed/switched.

More work on generating user-specific information in package manager queries.
APIs to update user name and query a user by id.
Removed Package.mSetStopped and mSetEnabled, since they're not user specific.

User removal:
- Cleanup ActivityManager, PackageManager, WallpaperManager, AppWidgetService
  and AccountManager.
- Shutdown processes belonging to the user.

Don't show vibrate option in long-press power if there's no vibrator.

Lock the screen when switching users, to force unlocking.

Change-Id: Ib23a721cb75285eef5fd6ba8c7272462764038fa
2012-03-27 11:23:01 -07:00
Dianne Hackborn
eba00ce996 Merge "Okay now let's really turn it off." 2012-03-26 11:12:28 -07:00
Dianne Hackborn
69dc66e91b Okay now let's really turn it off.
Change-Id: Idda3c13339a6a29a300555d31e67219c9af4ae68
2012-03-26 10:50:54 -07:00
Dianne Hackborn
a026b48972 Merge "Turn off "too slow" logs." 2012-03-26 10:40:50 -07:00
Dianne Hackborn
551d0b1f2a Turn off "too slow" logs.
Change-Id: I6ec306ca1c55226269c4644a869a984c4fa00f0d
2012-03-26 10:25:59 -07:00
Jeff Sharkey
69f819b397 Merge "Include GIDs for unenforced permissions." 2012-03-23 15:21:00 -07:00
Dianne Hackborn
8078d8c8a2 Add new thumbnail animation.
Use it for recent tasks switching.

Not perfect yet by far, but something.

Also fix issue #6186758: Twitter crashes after tapping on a tweet on JRM75D

Change-Id: I49bf6c94aafde875ac652dedaf96d6c08cc9e7d2
2012-03-23 14:13:13 -07:00
Jeff Sharkey
b9a070189c Include GIDs for unenforced permissions.
When READ_EXTERNAL_STORAGE isn't enforced, grant its GID to all
launched processes.  When changing enforcement, kill all processes
below foreground adjustment, causing them to be relaunched with
update GIDs.

Bug: 6131916
Change-Id: I6d83efc937919f13a1a7d9caac902e572869406a
2012-03-23 10:22:54 -07:00
Mike Lockwood
ced11a5bc4 Merge changes I35a76a27,I04bb7ad4,If38a1a10,Ice5be6e5,I009e443f,I968ddf90,I69d4e518,I09b1dfc9
* changes:
  Merge commit '74803dc'
  add config_bluetooth_default_profiles config var and use it to disable bt profiles
  Do not allow Surface creation on machines without SurfaceFlinger We will fail later anyways, but this change makes it much easier to track down places where we are inadvertently doing operations that depend on the flinger.
  fix setting only usb mode
  Detect (at runtime) kernel support for the "hdmi_audio" switch.
  Add a config resource to disable key-chord screenshotting
  Do not assume that there is always a running activity (Necessary for headless devices)
  Add batch volume adjust support to adjustMasterVolume() in AudioManager and AudioService.
2012-03-22 15:16:03 -07:00
Mike Lockwood
11c0ab9a08 Merge "ActivityManagerService: Disable app crashed dialog on headless builds" 2012-03-22 15:13:20 -07:00
Kevin Hester-Chow
d87a9be444 Do not assume that there is always a running activity
(Necessary for headless devices)

Change-Id: I69d4e518df99a02f2fbf19a9d86a693cea292f80
2012-03-22 15:09:21 -07:00
Mike Lockwood
86548c472a ActivityManagerService: Disable app crashed dialog on headless builds
Change-Id: I78bf2cb2cd9f99db57f447b7bfaca80c4fefbd66
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-03-22 15:09:00 -07:00