Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +3 −2 Original line number Diff line number Diff line Loading @@ -3025,8 +3025,9 @@ public final class ActivityStackSupervisor implements DisplayListener { /** Checks whether the activity should be shown for current user. */ boolean okToShowLocked(ActivityRecord r) { return r != null && (isCurrentProfileLocked(r.userId) || (r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0); return r != null && ((r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0 || (isCurrentProfileLocked(r.userId) && !mService.mUserController.isUserStoppingOrShuttingDownLocked(r.userId))); } final ArrayList<ActivityRecord> processStoppingActivitiesLocked(boolean remove) { Loading services/core/java/com/android/server/am/UserController.java +9 −0 Original line number Diff line number Diff line Loading @@ -1335,6 +1335,15 @@ final class UserController { return mStartedUserArray; } boolean isUserStoppingOrShuttingDownLocked(int userId) { UserState state = getStartedUserStateLocked(userId); if (state == null) { return false; } return state.state == UserState.STATE_STOPPING || state.state == UserState.STATE_SHUTDOWN; } boolean isUserRunningLocked(int userId, int flags) { UserState state = getStartedUserStateLocked(userId); if (state == null) { Loading services/core/java/com/android/server/pm/UserManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -732,9 +732,9 @@ public class UserManagerService extends IUserManager.Stub { long identity = Binder.clearCallingIdentity(); try { if (enableQuietMode) { ActivityManagerNative.getDefault().stopUser(userHandle, /* force */true, null); LocalServices.getService(ActivityManagerInternal.class) .killForegroundAppsForUser(userHandle); ActivityManagerNative.getDefault().stopUser(userHandle, /* force */true, null); } else { ActivityManagerNative.getDefault().startUserInBackground(userHandle); } Loading Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +3 −2 Original line number Diff line number Diff line Loading @@ -3025,8 +3025,9 @@ public final class ActivityStackSupervisor implements DisplayListener { /** Checks whether the activity should be shown for current user. */ boolean okToShowLocked(ActivityRecord r) { return r != null && (isCurrentProfileLocked(r.userId) || (r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0); return r != null && ((r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0 || (isCurrentProfileLocked(r.userId) && !mService.mUserController.isUserStoppingOrShuttingDownLocked(r.userId))); } final ArrayList<ActivityRecord> processStoppingActivitiesLocked(boolean remove) { Loading
services/core/java/com/android/server/am/UserController.java +9 −0 Original line number Diff line number Diff line Loading @@ -1335,6 +1335,15 @@ final class UserController { return mStartedUserArray; } boolean isUserStoppingOrShuttingDownLocked(int userId) { UserState state = getStartedUserStateLocked(userId); if (state == null) { return false; } return state.state == UserState.STATE_STOPPING || state.state == UserState.STATE_SHUTDOWN; } boolean isUserRunningLocked(int userId, int flags) { UserState state = getStartedUserStateLocked(userId); if (state == null) { Loading
services/core/java/com/android/server/pm/UserManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -732,9 +732,9 @@ public class UserManagerService extends IUserManager.Stub { long identity = Binder.clearCallingIdentity(); try { if (enableQuietMode) { ActivityManagerNative.getDefault().stopUser(userHandle, /* force */true, null); LocalServices.getService(ActivityManagerInternal.class) .killForegroundAppsForUser(userHandle); ActivityManagerNative.getDefault().stopUser(userHandle, /* force */true, null); } else { ActivityManagerNative.getDefault().startUserInBackground(userHandle); } Loading