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:
Robin Lee
2014-08-06 20:33:09 +01:00
parent 7dea98f6f9
commit faa4b3cb06

View File

@@ -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,