Reset fingerprint lockout upon successful unlock
FingerprintSettings should not start listening for fingerprints until after Pin/Pattern/Pass is entered Fixes: 63437524 Fixes: 63739006 Test: open FP settings, touch an invalid finger 5 times close FP settings, re-enter FP settings, enter Pin/Pattern/Pass touch FP with valid finger, should not be in lockout mode Change-Id: Ia2e219824c33169a5610b36123c42aa3d6ff22c5
This commit is contained in:
@@ -129,7 +129,6 @@ public class FingerprintSettings extends SubSettings {
|
|||||||
|
|
||||||
public static class FingerprintSettingsFragment extends SettingsPreferenceFragment
|
public static class FingerprintSettingsFragment extends SettingsPreferenceFragment
|
||||||
implements OnPreferenceChangeListener, FingerprintPreference.OnDeleteClickListener {
|
implements OnPreferenceChangeListener, FingerprintPreference.OnDeleteClickListener {
|
||||||
private static final int MAX_RETRY_ATTEMPTS = 20;
|
|
||||||
private static final int RESET_HIGHLIGHT_DELAY_MS = 500;
|
private static final int RESET_HIGHLIGHT_DELAY_MS = 500;
|
||||||
|
|
||||||
private static final String TAG = "FingerprintSettings";
|
private static final String TAG = "FingerprintSettings";
|
||||||
@@ -284,6 +283,11 @@ public class FingerprintSettings extends SubSettings {
|
|||||||
if (mRemovalSidecar.inProgress()) {
|
if (mRemovalSidecar.inProgress()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Don't start authentication if ChooseLockGeneric is showing, otherwise if the user
|
||||||
|
// is in FP lockout, a toast will show on top
|
||||||
|
if (mLaunchedConfirm) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!mInFingerprintLockout) {
|
if (!mInFingerprintLockout) {
|
||||||
mFingerprintCancel = new CancellationSignal();
|
mFingerprintCancel = new CancellationSignal();
|
||||||
mFingerprintManager.authenticate(null, mFingerprintCancel, 0 /* flags */,
|
mFingerprintManager.authenticate(null, mFingerprintCancel, 0 /* flags */,
|
||||||
@@ -432,6 +436,7 @@ public class FingerprintSettings extends SubSettings {
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
mInFingerprintLockout = false;
|
||||||
// Make sure we reload the preference hierarchy since fingerprints may be added,
|
// Make sure we reload the preference hierarchy since fingerprints may be added,
|
||||||
// deleted or renamed.
|
// deleted or renamed.
|
||||||
updatePreferences();
|
updatePreferences();
|
||||||
@@ -545,6 +550,7 @@ public class FingerprintSettings extends SubSettings {
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (requestCode == CHOOSE_LOCK_GENERIC_REQUEST
|
if (requestCode == CHOOSE_LOCK_GENERIC_REQUEST
|
||||||
|| requestCode == CONFIRM_REQUEST) {
|
|| requestCode == CONFIRM_REQUEST) {
|
||||||
|
mLaunchedConfirm = false;
|
||||||
if (resultCode == RESULT_FINISHED || resultCode == RESULT_OK) {
|
if (resultCode == RESULT_FINISHED || resultCode == RESULT_OK) {
|
||||||
// The lock pin/pattern/password was set. Start enrolling!
|
// The lock pin/pattern/password was set. Start enrolling!
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
|
Reference in New Issue
Block a user