Merge "Reset fingerprint lockout upon successful unlock" into oc-mr1-dev am: 2e7b65f74a
am: 5e8f4b6320
Change-Id: Iafc8de444be0c455a8b6e3e51c3b6b407fd125e5
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