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

Commit 6a64ac56 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Restore incorrect-PIN lockouts.

Bug: 7433439
Change-Id: I0262172db7c150aa9e73b932cc43a691f3ef9444
parent 080471e4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout

            @Override
            public void onFinish() {
                mSecurityMessageDisplay.setMessage("", false);
                resetState();
            }
        }.start();
+13 −5
Original line number Diff line number Diff line
@@ -61,8 +61,10 @@ public class KeyguardPINView extends KeyguardAbsKeyInputView
                @Override
                public void onClick(View v) {
                    doHapticKeyClick();
                    if (mPasswordEntry.isEnabled()) {
                        verifyPasswordAndUnlock();
                    }
                }
            });
            ok.setOnHoverListener(new NumPadKey.LiftToActivateListener(getContext()));
        }
@@ -74,16 +76,22 @@ public class KeyguardPINView extends KeyguardAbsKeyInputView
            pinDelete.setVisibility(View.VISIBLE);
            pinDelete.setOnClickListener(new OnClickListener() {
                public void onClick(View v) {
                    // check for time-based lockouts
                    if (mPasswordEntry.isEnabled()) {
                        CharSequence str = mPasswordEntry.getText();
                        if (str.length() > 0) {
                            mPasswordEntry.setText(str.subSequence(0, str.length()-1));
                        }
                    }
                    doHapticKeyClick();
                }
            });
            pinDelete.setOnLongClickListener(new View.OnLongClickListener() {
                public boolean onLongClick(View v) {
                    // check for time-based lockouts
                    if (mPasswordEntry.isEnabled()) {
                        mPasswordEntry.setText("");
                    }
                    doHapticKeyClick();
                    return true;
                }
+2 −1
Original line number Diff line number Diff line
@@ -51,7 +51,8 @@ public class NumPadKey extends Button {
                    }
                }
            }
            if (mTextView != null) {
            // check for time-based lockouts
            if (mTextView != null && mTextView.isEnabled()) {
                mTextView.append(String.valueOf(mDigit));
            }
            doHapticKeyClick();