Loading services/core/java/com/android/server/am/ActiveServices.java +3 −2 Original line number Diff line number Diff line Loading @@ -355,7 +355,8 @@ public final class ActiveServices { final ServiceMap smap = getServiceMap(r.userId); boolean addToStarting = false; if (!callerFg && r.app == null && mAm.mStartedUsers.get(r.userId) != null) { if (!callerFg && r.app == null && mAm.mUserController.hasStartedUserState(r.userId)) { ProcessRecord proc = mAm.getProcessRecordLocked(r.processName, r.appInfo.uid, false); if (proc == null || proc.curProcState > ActivityManager.PROCESS_STATE_RECEIVER) { // If this is not coming from a foreground caller, then we may want Loading Loading @@ -1401,7 +1402,7 @@ public final class ActiveServices { // Make sure that the user who owns this service is started. If not, // we don't want to allow it to run. if (mAm.mStartedUsers.get(r.userId) == null) { if (!mAm.mUserController.hasStartedUserState(r.userId)) { String msg = "Unable to launch app " + r.appInfo.packageName + "/" + r.appInfo.uid + " for service " Loading services/core/java/com/android/server/am/ActivityManagerService.java +68 −786 File changed.Preview size limit exceeded, changes collapsed. Show changes services/core/java/com/android/server/am/ActivityStack.java +2 −2 Original line number Diff line number Diff line Loading @@ -366,7 +366,7 @@ final class ActivityStack { mHandler = new ActivityStackHandler(mService.mHandler.getLooper()); mWindowManager = mService.mWindowManager; mStackId = activityContainer.mStackId; mCurrentUser = mService.mCurrentUserId; mCurrentUser = mService.mUserController.mCurrentUserId; mRecentTasks = recentTasks; mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID ? new LaunchingTaskPositioner() : null; Loading Loading @@ -1819,7 +1819,7 @@ final class ActivityStack { // Make sure that the user who owns this activity is started. If not, // we will just leave it as is because someone should be bringing // another user's activities to the top of the stack. if (mService.mStartedUsers.get(next.userId) == null) { if (!mService.mUserController.hasStartedUserState(next.userId)) { Slog.w(TAG, "Skipping resume of top activity " + next + ": user " + next.userId + " is stopped"); if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked(); Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +3 −7 Original line number Diff line number Diff line Loading @@ -97,7 +97,6 @@ import android.provider.Settings.SettingNotFoundException; import android.service.voice.IVoiceInteractionSession; import android.util.ArrayMap; import android.util.ArraySet; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Slog; import android.util.SparseArray; Loading Loading @@ -2693,7 +2692,7 @@ public final class ActivityStackSupervisor implements DisplayListener { // Complete user switch if (startingUsers != null) { for (int i = 0; i < startingUsers.size(); i++) { mService.finishUserSwitch(startingUsers.get(i)); mService.mUserController.finishUserSwitch(startingUsers.get(i)); } } // Complete starting up of background users Loading @@ -2701,7 +2700,7 @@ public final class ActivityStackSupervisor implements DisplayListener { startingUsers = new ArrayList<UserState>(mStartingBackgroundUsers); mStartingBackgroundUsers.clear(); for (int i = 0; i < startingUsers.size(); i++) { mService.finishUserBoot(startingUsers.get(i)); mService.mUserController.finishUserBoot(startingUsers.get(i)); } } } Loading Loading @@ -3756,10 +3755,7 @@ public final class ActivityStackSupervisor implements DisplayListener { /** Checks whether the userid is a profile of the current user. */ boolean isCurrentProfileLocked(int userId) { if (userId == mCurrentUser) return true; for (int i = 0; i < mService.mCurrentProfileIds.length; i++) { if (mService.mCurrentProfileIds[i] == userId) return true; } return false; return mService.mUserController.isCurrentProfileLocked(userId); } /** Checks whether the activity should be shown for current user. */ 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.getCurrentUserIdLocked(); userId = owner.mUserController.getCurrentUserIdLocked(); } switch (key.type) { case ActivityManager.INTENT_SENDER_ACTIVITY: Loading Loading
services/core/java/com/android/server/am/ActiveServices.java +3 −2 Original line number Diff line number Diff line Loading @@ -355,7 +355,8 @@ public final class ActiveServices { final ServiceMap smap = getServiceMap(r.userId); boolean addToStarting = false; if (!callerFg && r.app == null && mAm.mStartedUsers.get(r.userId) != null) { if (!callerFg && r.app == null && mAm.mUserController.hasStartedUserState(r.userId)) { ProcessRecord proc = mAm.getProcessRecordLocked(r.processName, r.appInfo.uid, false); if (proc == null || proc.curProcState > ActivityManager.PROCESS_STATE_RECEIVER) { // If this is not coming from a foreground caller, then we may want Loading Loading @@ -1401,7 +1402,7 @@ public final class ActiveServices { // Make sure that the user who owns this service is started. If not, // we don't want to allow it to run. if (mAm.mStartedUsers.get(r.userId) == null) { if (!mAm.mUserController.hasStartedUserState(r.userId)) { String msg = "Unable to launch app " + r.appInfo.packageName + "/" + r.appInfo.uid + " for service " Loading
services/core/java/com/android/server/am/ActivityManagerService.java +68 −786 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/core/java/com/android/server/am/ActivityStack.java +2 −2 Original line number Diff line number Diff line Loading @@ -366,7 +366,7 @@ final class ActivityStack { mHandler = new ActivityStackHandler(mService.mHandler.getLooper()); mWindowManager = mService.mWindowManager; mStackId = activityContainer.mStackId; mCurrentUser = mService.mCurrentUserId; mCurrentUser = mService.mUserController.mCurrentUserId; mRecentTasks = recentTasks; mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID ? new LaunchingTaskPositioner() : null; Loading Loading @@ -1819,7 +1819,7 @@ final class ActivityStack { // Make sure that the user who owns this activity is started. If not, // we will just leave it as is because someone should be bringing // another user's activities to the top of the stack. if (mService.mStartedUsers.get(next.userId) == null) { if (!mService.mUserController.hasStartedUserState(next.userId)) { Slog.w(TAG, "Skipping resume of top activity " + next + ": user " + next.userId + " is stopped"); if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked(); Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +3 −7 Original line number Diff line number Diff line Loading @@ -97,7 +97,6 @@ import android.provider.Settings.SettingNotFoundException; import android.service.voice.IVoiceInteractionSession; import android.util.ArrayMap; import android.util.ArraySet; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Slog; import android.util.SparseArray; Loading Loading @@ -2693,7 +2692,7 @@ public final class ActivityStackSupervisor implements DisplayListener { // Complete user switch if (startingUsers != null) { for (int i = 0; i < startingUsers.size(); i++) { mService.finishUserSwitch(startingUsers.get(i)); mService.mUserController.finishUserSwitch(startingUsers.get(i)); } } // Complete starting up of background users Loading @@ -2701,7 +2700,7 @@ public final class ActivityStackSupervisor implements DisplayListener { startingUsers = new ArrayList<UserState>(mStartingBackgroundUsers); mStartingBackgroundUsers.clear(); for (int i = 0; i < startingUsers.size(); i++) { mService.finishUserBoot(startingUsers.get(i)); mService.mUserController.finishUserBoot(startingUsers.get(i)); } } } Loading Loading @@ -3756,10 +3755,7 @@ public final class ActivityStackSupervisor implements DisplayListener { /** Checks whether the userid is a profile of the current user. */ boolean isCurrentProfileLocked(int userId) { if (userId == mCurrentUser) return true; for (int i = 0; i < mService.mCurrentProfileIds.length; i++) { if (mService.mCurrentProfileIds[i] == userId) return true; } return false; return mService.mUserController.isCurrentProfileLocked(userId); } /** Checks whether the activity should be shown for current user. */ 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.getCurrentUserIdLocked(); userId = owner.mUserController.getCurrentUserIdLocked(); } switch (key.type) { case ActivityManager.INTENT_SENDER_ACTIVITY: Loading