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

Commit 998a504c authored by Danielle Millett's avatar Danielle Millett Committed by Android (Google) Code Review
Browse files

Merge "Showing message when max attempts are hit in face unlock fixes...

Merge "Showing message when max attempts are hit in face unlock fixes b/7306168" into jb-mr1-lockscreen-dev
parents 09452829 1625e87e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -42,7 +42,11 @@ public class KeyguardPINView extends KeyguardAbsKeyInputView
    }

    protected void resetState() {
        if (KeyguardUpdateMonitor.getInstance(mContext).getMaxBiometricUnlockAttemptsReached()) {
            mSecurityMessageDisplay.setMessage(R.string.faceunlock_multiple_failures, true);
        } else {
            mSecurityMessageDisplay.setMessage(R.string.kg_pin_instructions, false);
        }
        mPasswordEntry.setEnabled(true);
    }

+10 −2
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
        if (deadline != 0) {
            handleAttemptLockout(deadline);
        } else {
            mSecurityMessageDisplay.setMessage(R.string.kg_pattern_instructions, false);
            displayDefaultSecurityMessage();
        }

        // the footer depends on how many total attempts the user has failed
@@ -197,6 +197,14 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit

    }

    private void displayDefaultSecurityMessage() {
        if (KeyguardUpdateMonitor.getInstance(mContext).getMaxBiometricUnlockAttemptsReached()) {
            mSecurityMessageDisplay.setMessage(R.string.faceunlock_multiple_failures, true);
        } else {
            mSecurityMessageDisplay.setMessage(R.string.kg_pattern_instructions, false);
        }
    }

    @Override
    public void showUsabilityHint() {
    }
@@ -338,7 +346,7 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
            @Override
            public void onFinish() {
                mLockPatternView.setEnabled(true);
                mSecurityMessageDisplay.setMessage(R.string.kg_pattern_instructions, false);
                displayDefaultSecurityMessage();
                // TODO mUnlockIcon.setVisibility(View.VISIBLE);
                mFailedPatternAttemptsSinceLastTimeout = 0;
                if (mEnableFallback) {