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

am: 00b77edec0

Change-Id: I16ea6b1c11cde1b9491826d7e95dc9bf3a45458b
This commit is contained in:
Kenny Guy
2017-03-14 12:16:23 +00:00
committed by android-build-merger

View File

@@ -3754,7 +3754,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) {