summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/fingerprint/FingerprintSettings.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/fingerprint/FingerprintSettings.java')
-rw-r--r--src/com/android/settings/fingerprint/FingerprintSettings.java25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/com/android/settings/fingerprint/FingerprintSettings.java b/src/com/android/settings/fingerprint/FingerprintSettings.java
index 8e63a51..cacd5dd 100644
--- a/src/com/android/settings/fingerprint/FingerprintSettings.java
+++ b/src/com/android/settings/fingerprint/FingerprintSettings.java
@@ -70,8 +70,9 @@ import java.util.List;
* Settings screen for fingerprints
*/
public class FingerprintSettings extends SubSettings {
+
/**
- * Used by the FP settings wizard to indicate the wizard is
+ * Used by the choose fingerprint wizard to indicate the wizard is
* finished, and each activity in the wizard should finish.
* <p>
* Previously, each activity in the wizard would finish itself after
@@ -79,7 +80,21 @@ public class FingerprintSettings extends SubSettings {
* behavior. So, now an activity does not finish itself until it gets this
* result.
*/
- static final int RESULT_FINISHED = RESULT_FIRST_USER;
+ protected static final int RESULT_FINISHED = RESULT_FIRST_USER;
+
+ /**
+ * Used by the enrolling screen during setup wizard to skip over setting up fingerprint, which
+ * will be useful if the user accidentally entered this flow.
+ */
+ protected static final int RESULT_SKIP = RESULT_FIRST_USER + 1;
+
+ /**
+ * Like {@link #RESULT_FINISHED} except this one indicates enrollment failed because the
+ * device was left idle. This is used to clear the credential token to require the user to
+ * re-enter their pin/pattern/password before continuing.
+ */
+ protected static final int RESULT_TIMEOUT = RESULT_FIRST_USER + 2;
+
private static final long LOCKOUT_DURATION = 30000; // time we have to wait for fp to reset, ms
@Override
@@ -441,6 +456,12 @@ public class FingerprintSettings extends SubSettings {
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
}
}
+ } else if (requestCode == ADD_FINGERPRINT_REQUEST) {
+ if (resultCode == RESULT_TIMEOUT) {
+ Activity activity = getActivity();
+ activity.setResult(RESULT_TIMEOUT);
+ activity.finish();
+ }
}
if (mToken == null) {