Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +14 −7 Original line number Diff line number Diff line Loading @@ -2996,10 +2996,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.BIND_DEVICE_ADMIN, null); synchronized (this) { DevicePolicyData policy = getUserData(userHandle); long ident = Binder.clearCallingIdentity(); try { boolean wipeData = false; int identifier = 0; synchronized (this) { DevicePolicyData policy = getUserData(userHandle); policy.mFailedPasswordAttempts++; saveSettingsLocked(userHandle); if (mHasFeature) { Loading @@ -3011,17 +3013,22 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { // Wipe the user/profile associated with the policy that was violated. This // is not necessarily calling user: if the policy that fired was from a // managed profile rather than the main user profile, we wipe former only. wipeDeviceOrUserLocked(0, strictestAdmin.getUserHandle().getIdentifier()); wipeData = true; identifier = strictestAdmin.getUserHandle().getIdentifier(); } sendAdminCommandToSelfAndProfilesLocked( DeviceAdminReceiver.ACTION_PASSWORD_FAILED, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, userHandle); } } if (wipeData) { // Call without holding lock. wipeDeviceOrUserLocked(0, identifier); } } finally { Binder.restoreCallingIdentity(ident); } } } public void reportSuccessfulPasswordAttempt(int userHandle) { enforceCrossUserPermission(userHandle); Loading Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +14 −7 Original line number Diff line number Diff line Loading @@ -2996,10 +2996,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.BIND_DEVICE_ADMIN, null); synchronized (this) { DevicePolicyData policy = getUserData(userHandle); long ident = Binder.clearCallingIdentity(); try { boolean wipeData = false; int identifier = 0; synchronized (this) { DevicePolicyData policy = getUserData(userHandle); policy.mFailedPasswordAttempts++; saveSettingsLocked(userHandle); if (mHasFeature) { Loading @@ -3011,17 +3013,22 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { // Wipe the user/profile associated with the policy that was violated. This // is not necessarily calling user: if the policy that fired was from a // managed profile rather than the main user profile, we wipe former only. wipeDeviceOrUserLocked(0, strictestAdmin.getUserHandle().getIdentifier()); wipeData = true; identifier = strictestAdmin.getUserHandle().getIdentifier(); } sendAdminCommandToSelfAndProfilesLocked( DeviceAdminReceiver.ACTION_PASSWORD_FAILED, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, userHandle); } } if (wipeData) { // Call without holding lock. wipeDeviceOrUserLocked(0, identifier); } } finally { Binder.restoreCallingIdentity(ident); } } } public void reportSuccessfulPasswordAttempt(int userHandle) { enforceCrossUserPermission(userHandle); Loading