Merge "DO NOT MERGE Clear calling identity before checking if user is running." into nyc-dev

am: 2df7f9f9c0

Change-Id: I9ca23aa395e0120413a60174e9b7ef44d91a90b1
This commit is contained in:
Kenny Guy
2017-03-14 12:07:26 +00:00
committed by android-build-merger

View File

@@ -3668,7 +3668,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);
}
if (policy.mActivePasswordQuality < getPasswordQuality(null, userHandle, parent)
|| policy.mActivePasswordLength < getPasswordMinimumLength(