OSDN Git Service

resolve merge conflicts of ad4aa1ce7d3d to nyc-mr1-dev
authorAndrew Scull <ascull@google.com>
Fri, 13 Jan 2017 15:28:36 +0000 (15:28 +0000)
committerAndrew Scull <ascull@google.com>
Fri, 13 Jan 2017 15:28:36 +0000 (15:28 +0000)
Change-Id: I97ef31536cd06495a08a3f94f81df2d1376186e0

1  2 
core/java/android/app/admin/DevicePolicyManager.java
core/java/android/app/admin/IDevicePolicyManager.aidl
services/core/java/com/android/server/LockSettingsService.java
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java

@@@ -3740,12 -3667,10 +3729,14 @@@ public class DevicePolicyManagerServic
  
      private boolean isActivePasswordSufficientForUserLocked(
              DevicePolicyData policy, int userHandle, boolean parent) {
 -        if (policy.mActivePasswordQuality < getPasswordQuality(null, userHandle, parent)
 -                || policy.mActivePasswordLength < getPasswordMinimumLength(
+         enforceUserUnlocked(userHandle, parent);
 +        final int requiredPasswordQuality = getPasswordQuality(null, userHandle, parent);
 +        if (policy.mActivePasswordQuality < requiredPasswordQuality) {
 +            return false;
 +        }
 +        if (requiredPasswordQuality >= DevicePolicyManager.PASSWORD_QUALITY_NUMERIC
 +                && policy.mActivePasswordLength < getPasswordMinimumLength(
                          null, userHandle, parent)) {
              return false;
          }