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

am: c5d86736d3

Change-Id: I0886d46f74fec980eb8bd6c99d8b647e294bcb21
This commit is contained in:
Kenny Guy
2017-03-14 12:11:54 +00:00
committed by android-build-merger

View File

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