summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index c5e1933..7e59943 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -5817,12 +5817,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
final int userId = UserHandle.getCallingUserId();
LockPatternUtils utils = new LockPatternUtils(mContext);
- // disallow disabling the keyguard if a password is currently set
- if (!enabled && utils.isSecure(userId)) {
- return false;
- }
long ident = Binder.clearCallingIdentity();
try {
+ // disallow disabling the keyguard if a password is currently set
+ if (!enabled && utils.isSecure(userId)) {
+ return false;
+ }
utils.setLockScreenDisabled(!enabled, userId);
} finally {
Binder.restoreCallingIdentity(ident);