commit | faa4b3cb06f3b10ece1f1d246a3530fc2f30a6da | [log] [tgz] |
---|---|---|
author | Robin Lee <rgl@google.com> | Wed Aug 06 20:33:09 2014 +0100 |
committer | Robin Lee <rgl@google.com> | Thu Aug 07 10:15:45 2014 +0100 |
tree | dceaab6ce25f8c4258a20bd018474d29aa32c3e4 | |
parent | 7dea98f6f929cce598d669a802b13851987e2e64 [diff] |
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
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index ae2ef06..07ad9e4 100755 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -17244,6 +17244,10 @@ 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,