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

This commit is contained in:
Kenny Guy
2017-03-14 12:01:54 +00:00
committed by Android (Google) Code Review

View File

@@ -3653,7 +3653,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(