summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2014-10-21 22:12:38 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-21 22:12:38 +0000
commit55bc7dc4288e2c2cdd0bd9c2d06c38e00d139d5c (patch)
tree8bebbbd9f9d9bb17b4d62551d0b89e87713742cf /packages/SystemUI
parentc19586a8055b27bc7c7cc3ac3e1f38eec8cc82a9 (diff)
parentccbeb61ac21527839deb115199cbe98fa2b73c05 (diff)
downloadframeworks_base-55bc7dc4288e2c2cdd0bd9c2d06c38e00d139d5c.zip
frameworks_base-55bc7dc4288e2c2cdd0bd9c2d06c38e00d139d5c.tar.gz
frameworks_base-55bc7dc4288e2c2cdd0bd9c2d06c38e00d139d5c.tar.bz2
am ccbeb61a: Block monkey from creating user profiles
* commit 'ccbeb61ac21527839deb115199cbe98fa2b73c05': Block monkey from creating user profiles
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index eb808c2..5c7909a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -571,6 +571,9 @@ public class UserSwitcherController {
cancel();
} else {
dismiss();
+ if (ActivityManager.isUserAMonkey()) {
+ return;
+ }
UserInfo user = mUserManager.createSecondaryUser(
mContext.getString(R.string.user_new_user_name), 0 /* flags */);
if (user == null) {