diff options
| author | Craig Mautner <cmautner@google.com> | 2013-04-24 14:53:51 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-24 14:53:51 +0000 |
| commit | a2e56c5a2fb909befa0d58ec30ce7e628ffff82a (patch) | |
| tree | c9f51a02e3201d44f3c082384429e6b9e8bd19d6 /services/java/com/android/server/am/ActivityManagerService.java | |
| parent | c56b831a1f6f044451df69aafaea1b37c780a360 (diff) | |
| parent | 858d8a6583b0c91c66960167b84c67b6c4e2d3c6 (diff) | |
| download | frameworks_base-a2e56c5a2fb909befa0d58ec30ce7e628ffff82a.zip frameworks_base-a2e56c5a2fb909befa0d58ec30ce7e628ffff82a.tar.gz frameworks_base-a2e56c5a2fb909befa0d58ec30ce7e628ffff82a.tar.bz2 | |
Merge "Fix user switching."
Diffstat (limited to 'services/java/com/android/server/am/ActivityManagerService.java')
| -rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index dd113c3..c750cad 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -3612,7 +3612,7 @@ public final class ActivityManagerService extends ActivityManagerNative "for process:"+packageName); } } - + try { // Clear application user data pm.clearApplicationUserData(packageName, observer, userId); @@ -3681,7 +3681,7 @@ public final class ActivityManagerService extends ActivityManagerNative Slog.w(TAG, msg); throw new SecurityException(msg); } - + long callingId = Binder.clearCallingIdentity(); try { synchronized(this) { @@ -3702,7 +3702,7 @@ public final class ActivityManagerService extends ActivityManagerNative } } } - + int N = procs.size(); for (int i=0; i<N; i++) { removeProcessLocked(procs.get(i), false, true, "kill all background"); @@ -3971,7 +3971,7 @@ public final class ActivityManagerService extends ActivityManagerNative procs.add(app); } } - + int N = procs.size(); for (int i=0; i<N; i++) { removeProcessLocked(procs.get(i), callerWillRestart, allowRestart, reason); @@ -4133,7 +4133,7 @@ public final class ActivityManagerService extends ActivityManagerNative } } if (mBooted) { - mStackSupervisor.resumeTopActivityLocked(); + mStackSupervisor.resumeTopActivitiesLocked(); mStackSupervisor.scheduleIdleLocked(); } } @@ -4983,7 +4983,8 @@ public final class ActivityManagerService extends ActivityManagerNative updateOomAdjLocked(); } } - + + @Override public void setProcessForeground(IBinder token, int pid, boolean isForeground) { enforceCallingPermission(android.Manifest.permission.SET_PROCESS_LIMIT, "setProcessForeground()"); @@ -5007,6 +5008,7 @@ public final class ActivityManagerService extends ActivityManagerNative } if (isForeground && token != null) { ForegroundToken newToken = new ForegroundToken() { + @Override public void binderDied() { foregroundTokenDied(this); } @@ -5041,6 +5043,7 @@ public final class ActivityManagerService extends ActivityManagerNative mActivityManagerService = activityManagerService; } + @Override public boolean checkPermission(String permission, int pid, int uid) { return mActivityManagerService.checkPermission(permission, pid, uid) == PackageManager.PERMISSION_GRANTED; @@ -5048,12 +5051,14 @@ public final class ActivityManagerService extends ActivityManagerNative } class IntentFirewallInterface implements IntentFirewall.AMSInterface { + @Override public int checkComponentPermission(String permission, int pid, int uid, int owningUid, boolean exported) { return ActivityManagerService.this.checkComponentPermission(permission, pid, uid, owningUid, exported); } + @Override public Object getAMSLock() { return ActivityManagerService.this; } @@ -8281,7 +8286,7 @@ public final class ActivityManagerService extends ActivityManagerNative } finally { Binder.restoreCallingIdentity(ident); } - mStackSupervisor.resumeTopActivityLocked(); + mStackSupervisor.resumeTopActivitiesLocked(); sendUserSwitchBroadcastsLocked(-1, mCurrentUserId); } } @@ -8396,10 +8401,10 @@ public final class ActivityManagerService extends ActivityManagerNative // annoy the user repeatedly. Unless it is persistent, since those // processes run critical code. removeProcessLocked(app, false, false, "crash"); - mStackSupervisor.resumeTopActivityLocked(); + mStackSupervisor.resumeTopActivitiesLocked(); return false; } - mStackSupervisor.resumeTopActivityLocked(); + mStackSupervisor.resumeTopActivitiesLocked(); } else { mStackSupervisor.finishTopRunningActivityLocked(app); } |
