Loading services/java/com/android/server/DevicePolicyManagerService.java +8 −5 Original line number Diff line number Diff line Loading @@ -1659,11 +1659,14 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { DeviceAdminInfo.USES_POLICY_FORCE_LOCK); long ident = Binder.clearCallingIdentity(); try { if (mIPowerManager.isScreenOn()) { // Power off the display mIPowerManager.goToSleepWithReason(SystemClock.uptimeMillis(), WindowManagerPolicy.OFF_BECAUSE_OF_ADMIN); } else { // Ensure the device is locked getWindowManager().lockNow(); } } catch (RemoteException e) { } finally { Binder.restoreCallingIdentity(ident); Loading Loading
services/java/com/android/server/DevicePolicyManagerService.java +8 −5 Original line number Diff line number Diff line Loading @@ -1659,11 +1659,14 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { DeviceAdminInfo.USES_POLICY_FORCE_LOCK); long ident = Binder.clearCallingIdentity(); try { if (mIPowerManager.isScreenOn()) { // Power off the display mIPowerManager.goToSleepWithReason(SystemClock.uptimeMillis(), WindowManagerPolicy.OFF_BECAUSE_OF_ADMIN); } else { // Ensure the device is locked getWindowManager().lockNow(); } } catch (RemoteException e) { } finally { Binder.restoreCallingIdentity(ident); Loading