Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit faa4b3cb authored by Robin Lee's avatar Robin Lee
Browse files

Disallow switching managed profile to foreground

Another check in the ActivityManager to stop us from getting into an
invalid state by a fat-fingered 'am switch' etc.

@bug 16814252

Change-Id: Id65ab647d5a535cc2f965139a1b717cf65aa7e69
parent 7dea98f6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17244,6 +17244,10 @@ public final class ActivityManagerService extends ActivityManagerNative
                    Slog.w(TAG, "No user info for user #" + userId);
                    return false;
                }
                if (foreground && userInfo.isManagedProfile()) {
                    Slog.w(TAG, "Cannot switch to User #" + userId + ": not a full user");
                    return false;
                }
                if (foreground) {
                    mWindowManager.startFreezingScreen(R.anim.screen_user_exit,