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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user