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

Commit 00d21e3c authored by Kevin Chyn's avatar Kevin Chyn
Browse files

FingerprintSettings should handle FINGERPRINT_ERROR_LOCKOUT_PERMANENT

Fixes: 62681560

Test: open fingerprint settings, use an unenrolled fingerprint to
authenticate 20 times in a row. Look at logs and it shouldn't be flooded
with fingerprint logs

Change-Id: I59051e8d3a9e040bcd894e956abcbf0497838988
parent 2de5ab35
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -261,14 +261,18 @@ public class FingerprintSettings extends SubSettings {
                        mHandler.postDelayed(mFingerprintLockoutReset,
                                LOCKOUT_DURATION);
                    }
                    // Fall through to show message
                default:
                    break;
                case FingerprintManager.FINGERPRINT_ERROR_LOCKOUT_PERMANENT:
                    mInFingerprintLockout = true;
                    break;
            }

            if (mInFingerprintLockout) {
                // Activity can be null on a screen rotation.
                final Activity activity = getActivity();
                if (activity != null) {
                        Toast.makeText(activity, msg , Toast.LENGTH_SHORT);
                    Toast.makeText(activity, msg , Toast.LENGTH_SHORT).show();
                }
                break;
            }
            retryFingerprint(); // start again
        }