Loading services/core/java/com/android/server/am/ActiveServices.java +8 −7 Original line number Diff line number Diff line Loading @@ -337,7 +337,7 @@ public final class ActiveServices { ServiceRecord r = res.record; if (!mAm.getUserManagerLocked().exists(r.userId)) { if (!mAm.mUserController.exists(r.userId)) { Slog.d(TAG, "Trying to start service with non-existent user! " + r.userId); return null; } Loading Loading @@ -1030,8 +1030,8 @@ public final class ActiveServices { if (DEBUG_SERVICE) Slog.v(TAG_SERVICE, "retrieveServiceLocked: " + service + " type=" + resolvedType + " callingUid=" + callingUid); userId = mAm.handleIncomingUser(callingPid, callingUid, userId, false, ActivityManagerService.ALLOW_NON_FULL_IN_PROFILE, "service", null); userId = mAm.mUserController.handleIncomingUser(callingPid, callingUid, userId, false, ActivityManagerService.ALLOW_NON_FULL_IN_PROFILE, "service", null); ServiceMap smap = getServiceMap(userId); final ComponentName comp = service.getComponent(); Loading Loading @@ -2333,7 +2333,8 @@ public final class ActiveServices { EventLog.writeEvent(EventLogTags.AM_SERVICE_CRASHED_TOO_MUCH, sr.userId, sr.crashCount, sr.shortName, app.pid); bringDownServiceLocked(sr); } else if (!allowRestart || !mAm.isUserRunningLocked(sr.userId, false)) { } else if (!allowRestart || !mAm.mUserController.isUserRunningLocked(sr.userId, false)) { bringDownServiceLocked(sr); } else { boolean canceled = scheduleServiceRestartLocked(sr, true); Loading Loading @@ -2446,7 +2447,7 @@ public final class ActiveServices { if (ActivityManager.checkUidPermission( android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, uid) == PackageManager.PERMISSION_GRANTED) { int[] users = mAm.getUsersLocked(); int[] users = mAm.mUserController.getUsers(); for (int ui=0; ui<users.length && res.size() < maxNum; ui++) { ArrayMap<ComponentName, ServiceRecord> alls = getServices(users[ui]); for (int i=0; i<alls.size() && res.size() < maxNum; i++) { Loading Loading @@ -2580,7 +2581,7 @@ public final class ActiveServices { pw.print(mLastAnrDump); pw.println(); } int[] users = mAm.getUsersLocked(); int[] users = mAm.mUserController.getUsers(); for (int user : users) { ServiceMap smap = getServiceMap(user); boolean printed = false; Loading Loading @@ -2817,7 +2818,7 @@ public final class ActiveServices { ArrayList<ServiceRecord> services = new ArrayList<ServiceRecord>(); synchronized (mAm) { int[] users = mAm.getUsersLocked(); int[] users = mAm.mUserController.getUsers(); if ("all".equals(name)) { for (int user : users) { ServiceMap smap = mServiceMap.get(user); Loading services/core/java/com/android/server/am/ActivityManagerService.java +61 −252 File changed.Preview size limit exceeded, changes collapsed. Show changes services/core/java/com/android/server/am/ActivityStack.java +1 −1 Original line number Diff line number Diff line Loading @@ -362,7 +362,7 @@ final class ActivityStack { mHandler = new ActivityStackHandler(mService.mHandler.getLooper()); mWindowManager = mService.mWindowManager; mStackId = activityContainer.mStackId; mCurrentUser = mService.mUserController.mCurrentUserId; mCurrentUser = mService.mUserController.getCurrentUserIdLocked(); mRecentTasks = recentTasks; mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID ? new LaunchingTaskPositioner() : null; Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +2 −2 Original line number Diff line number Diff line Loading @@ -4671,7 +4671,7 @@ public final class ActivityStackSupervisor implements DisplayListener { @Override public final int startActivity(Intent intent) { mService.enforceNotIsolatedCaller("ActivityContainer.startActivity"); final int userId = mService.handleIncomingUser(Binder.getCallingPid(), final int userId = mService.mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), mCurrentUser, false, ActivityManagerService.ALLOW_FULL_ONLY, "ActivityContainer", null); Loading @@ -4697,7 +4697,7 @@ public final class ActivityStackSupervisor implements DisplayListener { throw new IllegalArgumentException("Bad PendingIntent object"); } final int userId = mService.handleIncomingUser(Binder.getCallingPid(), final int userId = mService.mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), mCurrentUser, false, ActivityManagerService.ALLOW_FULL_ONLY, "ActivityContainer", null); Loading services/core/java/com/android/server/am/PendingIntentRecord.java +1 −1 Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ final class PendingIntentRecord extends IIntentSender.Stub { boolean sendFinish = finishedReceiver != null; int userId = key.userId; if (userId == UserHandle.USER_CURRENT) { userId = owner.mUserController.getCurrentUserIdLocked(); userId = owner.mUserController.getCurrentOrTargetUserIdLocked(); } switch (key.type) { case ActivityManager.INTENT_SENDER_ACTIVITY: Loading Loading
services/core/java/com/android/server/am/ActiveServices.java +8 −7 Original line number Diff line number Diff line Loading @@ -337,7 +337,7 @@ public final class ActiveServices { ServiceRecord r = res.record; if (!mAm.getUserManagerLocked().exists(r.userId)) { if (!mAm.mUserController.exists(r.userId)) { Slog.d(TAG, "Trying to start service with non-existent user! " + r.userId); return null; } Loading Loading @@ -1030,8 +1030,8 @@ public final class ActiveServices { if (DEBUG_SERVICE) Slog.v(TAG_SERVICE, "retrieveServiceLocked: " + service + " type=" + resolvedType + " callingUid=" + callingUid); userId = mAm.handleIncomingUser(callingPid, callingUid, userId, false, ActivityManagerService.ALLOW_NON_FULL_IN_PROFILE, "service", null); userId = mAm.mUserController.handleIncomingUser(callingPid, callingUid, userId, false, ActivityManagerService.ALLOW_NON_FULL_IN_PROFILE, "service", null); ServiceMap smap = getServiceMap(userId); final ComponentName comp = service.getComponent(); Loading Loading @@ -2333,7 +2333,8 @@ public final class ActiveServices { EventLog.writeEvent(EventLogTags.AM_SERVICE_CRASHED_TOO_MUCH, sr.userId, sr.crashCount, sr.shortName, app.pid); bringDownServiceLocked(sr); } else if (!allowRestart || !mAm.isUserRunningLocked(sr.userId, false)) { } else if (!allowRestart || !mAm.mUserController.isUserRunningLocked(sr.userId, false)) { bringDownServiceLocked(sr); } else { boolean canceled = scheduleServiceRestartLocked(sr, true); Loading Loading @@ -2446,7 +2447,7 @@ public final class ActiveServices { if (ActivityManager.checkUidPermission( android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, uid) == PackageManager.PERMISSION_GRANTED) { int[] users = mAm.getUsersLocked(); int[] users = mAm.mUserController.getUsers(); for (int ui=0; ui<users.length && res.size() < maxNum; ui++) { ArrayMap<ComponentName, ServiceRecord> alls = getServices(users[ui]); for (int i=0; i<alls.size() && res.size() < maxNum; i++) { Loading Loading @@ -2580,7 +2581,7 @@ public final class ActiveServices { pw.print(mLastAnrDump); pw.println(); } int[] users = mAm.getUsersLocked(); int[] users = mAm.mUserController.getUsers(); for (int user : users) { ServiceMap smap = getServiceMap(user); boolean printed = false; Loading Loading @@ -2817,7 +2818,7 @@ public final class ActiveServices { ArrayList<ServiceRecord> services = new ArrayList<ServiceRecord>(); synchronized (mAm) { int[] users = mAm.getUsersLocked(); int[] users = mAm.mUserController.getUsers(); if ("all".equals(name)) { for (int user : users) { ServiceMap smap = mServiceMap.get(user); Loading
services/core/java/com/android/server/am/ActivityManagerService.java +61 −252 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/core/java/com/android/server/am/ActivityStack.java +1 −1 Original line number Diff line number Diff line Loading @@ -362,7 +362,7 @@ final class ActivityStack { mHandler = new ActivityStackHandler(mService.mHandler.getLooper()); mWindowManager = mService.mWindowManager; mStackId = activityContainer.mStackId; mCurrentUser = mService.mUserController.mCurrentUserId; mCurrentUser = mService.mUserController.getCurrentUserIdLocked(); mRecentTasks = recentTasks; mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID ? new LaunchingTaskPositioner() : null; Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +2 −2 Original line number Diff line number Diff line Loading @@ -4671,7 +4671,7 @@ public final class ActivityStackSupervisor implements DisplayListener { @Override public final int startActivity(Intent intent) { mService.enforceNotIsolatedCaller("ActivityContainer.startActivity"); final int userId = mService.handleIncomingUser(Binder.getCallingPid(), final int userId = mService.mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), mCurrentUser, false, ActivityManagerService.ALLOW_FULL_ONLY, "ActivityContainer", null); Loading @@ -4697,7 +4697,7 @@ public final class ActivityStackSupervisor implements DisplayListener { throw new IllegalArgumentException("Bad PendingIntent object"); } final int userId = mService.handleIncomingUser(Binder.getCallingPid(), final int userId = mService.mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), mCurrentUser, false, ActivityManagerService.ALLOW_FULL_ONLY, "ActivityContainer", null); Loading
services/core/java/com/android/server/am/PendingIntentRecord.java +1 −1 Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ final class PendingIntentRecord extends IIntentSender.Stub { boolean sendFinish = finishedReceiver != null; int userId = key.userId; if (userId == UserHandle.USER_CURRENT) { userId = owner.mUserController.getCurrentUserIdLocked(); userId = owner.mUserController.getCurrentOrTargetUserIdLocked(); } switch (key.type) { case ActivityManager.INTENT_SENDER_ACTIVITY: Loading