diff options
author | Kenny Guy <kennyguy@google.com> | 2015-02-05 19:39:36 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-05 19:39:36 +0000 |
commit | 3775a3f8861304073c2b2079f0b9a315a58c1d1a (patch) | |
tree | 6998afc5dd15fc8b7cd623796fa9d949bb06d8c6 /services/devicepolicy | |
parent | 5bb72554549c5cc722d5666180d1219b33e1f70a (diff) | |
parent | a2ced3e879458786edf715a0016293791db7fd65 (diff) | |
download | frameworks_base-3775a3f8861304073c2b2079f0b9a315a58c1d1a.zip frameworks_base-3775a3f8861304073c2b2079f0b9a315a58c1d1a.tar.gz frameworks_base-3775a3f8861304073c2b2079f0b9a315a58c1d1a.tar.bz2 |
am a2ced3e8: am 8d12d3da: Merge "Only switch user if current user is being wiped" into lmp-mr1-dev automerge: eeb43fb
* commit 'a2ced3e879458786edf715a0016293791db7fd65':
Only switch user if current user is being wiped
Diffstat (limited to 'services/devicepolicy')
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index bec0f66..b8f0d07 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -3049,7 +3049,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { mHandler.post(new Runnable() { public void run() { try { - ActivityManagerNative.getDefault().switchUser(UserHandle.USER_OWNER); + IActivityManager am = ActivityManagerNative.getDefault(); + if (am.getCurrentUser().id == userHandle) { + am.switchUser(UserHandle.USER_OWNER); + } if (!mUserManager.removeUser(userHandle)) { Slog.w(LOG_TAG, "Couldn't remove user " + userHandle); } |