Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16b4ac8a authored by Robin Lee's avatar Robin Lee Committed by Android (Google) Code Review
Browse files

Merge "Credential storage: check lock quality for right user" into nyc-dev

parents 76a29810 330c2052
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -208,9 +208,9 @@ public final class CredentialStorage extends Activity {
     * Returns true if the currently set key guard matches our minimum quality requirements.
     */
    private boolean checkKeyGuardQuality() {
        UserInfo parent = UserManager.get(this).getProfileParent(UserHandle.myUserId());
        int quality = new LockPatternUtils(this).getActivePasswordQuality(
                parent != null ? parent.id : UserHandle.myUserId());
        int credentialOwner =
                UserManager.get(this).getCredentialOwnerProfile(UserHandle.myUserId());
        int quality = new LockPatternUtils(this).getActivePasswordQuality(credentialOwner);
        return (quality >= MIN_PASSWORD_QUALITY);
    }