From 50c360790ca4c061aa6a1d94e06bd7e25b0f0436 Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Wed, 30 Jul 2014 15:09:34 +0100 Subject: Don't turn off screen after wiping user profiles The activity manager should know when to lock the screen. If an admin does want this to happen then they should be able to run both commands in succession. Also rectifies some creative code styling in the same DPM method. @bug 15558805 Change-Id: I8918184a4585aa8b061eb4a68edc2ec6805d8127 --- .../com/android/server/devicepolicy/DevicePolicyManagerService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'services/devicepolicy') diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 15bea5a..6ab504c 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -2612,13 +2612,11 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { if (userHandle == UserHandle.USER_OWNER) { wipeDataLocked(flags); } else { - lockNowUnchecked(); mHandler.post(new Runnable() { public void run() { try { ActivityManagerNative.getDefault().switchUser(UserHandle.USER_OWNER); - (mUserManager) - .removeUser(userHandle); + mUserManager.removeUser(userHandle); } catch (RemoteException re) { // Shouldn't happen } -- cgit v1.1