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

Commit 5c3f44b6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't attemp to verify synthetic password from adb."

parents a5e36b15 fc135c7e
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -160,6 +160,11 @@ class LockSettingsShellCommand extends ShellCommand {
        final boolean havePassword = mLockPatternUtils.isLockPasswordEnabled(mCurrentUserId);
        final boolean havePassword = mLockPatternUtils.isLockPasswordEnabled(mCurrentUserId);
        final boolean havePattern = mLockPatternUtils.isLockPatternEnabled(mCurrentUserId);
        final boolean havePattern = mLockPatternUtils.isLockPatternEnabled(mCurrentUserId);
        if (havePassword || havePattern) {
        if (havePassword || havePattern) {
            if (mLockPatternUtils.isManagedProfileWithUnifiedChallenge(mCurrentUserId)) {
                getOutPrintWriter().println("Profile uses unified challenge");
                return false;
            }

            try {
            try {
                final boolean result;
                final boolean result;
                if (havePassword) {
                if (havePassword) {
@@ -168,9 +173,7 @@ class LockSettingsShellCommand extends ShellCommand {
                    result = mLockPatternUtils.checkPattern(stringToPattern(mOld), mCurrentUserId);
                    result = mLockPatternUtils.checkPattern(stringToPattern(mOld), mCurrentUserId);
                }
                }
                if (!result) {
                if (!result) {
                    if (!mLockPatternUtils.isManagedProfileWithUnifiedChallenge(mCurrentUserId)) {
                    mLockPatternUtils.reportFailedPasswordAttempt(mCurrentUserId);
                    mLockPatternUtils.reportFailedPasswordAttempt(mCurrentUserId);
                    }
                    getOutPrintWriter().println("Old password '" + mOld + "' didn't match");
                    getOutPrintWriter().println("Old password '" + mOld + "' didn't match");
                }
                }
                return result;
                return result;