Merge "DO NOT MERGE Clear calling identity before checking if user is running." into nyc-dev am: 2df7f9f9c0 am: c5d86736d3 am: 00b77edec0 am: 11c5ff0399

am: d49386eaa5

Change-Id: If8ade174d66418ecd43606cd57a98655e37deec8
This commit is contained in:
Kenny Guy
2017-03-14 12:25:59 +00:00
committed by android-build-merger

View File

@@ -3809,7 +3809,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
private boolean isActivePasswordSufficientForUserLocked(
DevicePolicyData policy, int userHandle, boolean parent) {
enforceUserUnlocked(userHandle, parent);
final long id = Binder.clearCallingIdentity();
try {
enforceUserUnlocked(userHandle, parent);
} finally {
Binder.restoreCallingIdentity(id);
}
final int requiredPasswordQuality = getPasswordQuality(null, userHandle, parent);
if (policy.mActivePasswordQuality < requiredPasswordQuality) {