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

Commit e272aa95 authored by Robin Lee's avatar Robin Lee Committed by Android Git Automerger
Browse files

am e07e39b7: Disallow switching managed profile to foreground

* commit 'e07e39b75b8a25549ff9ab70f228e101727b4db2':
  Disallow switching managed profile to foreground
parents 88f061d4 faa4b3cb
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,