fingerprint settings: pass auth token to FPEnroll

Change-Id: I6e8d6d2eb5a2b5d2828af76047839ed79f804104
This commit is contained in:
Andres Morales
2015-04-14 19:01:51 -07:00
parent e29dae683e
commit 55af42dce5
2 changed files with 6 additions and 1 deletions

View File

@@ -384,7 +384,11 @@ public class FingerprintEnroll extends SettingsActivity {
mContentView.findViewById(buttons[i]).setOnClickListener(this); mContentView.findViewById(buttons[i]).setOnClickListener(this);
} }
LockPatternUtils utils = new LockPatternUtils(activity); if (mToken == null) {
mToken = getActivity().getIntent().getByteArrayExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
}
if (mToken == null) { if (mToken == null) {
// need to choose or confirm lock // need to choose or confirm lock
updateStage(Stage.EnrollingOnboard); updateStage(Stage.EnrollingOnboard);

View File

@@ -315,6 +315,7 @@ public class FingerprintSettings extends SettingsActivity {
if (KEY_FINGERPRINT_ADD.equals(key)) { if (KEY_FINGERPRINT_ADD.equals(key)) {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClassName("com.android.settings", FingerprintEnroll.class.getName()); intent.setClassName("com.android.settings", FingerprintEnroll.class.getName());
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN, mToken);
stopFingerprint(); stopFingerprint();
startActivityForResult(intent, ADD_FINGERPRINT_REQUEST); startActivityForResult(intent, ADD_FINGERPRINT_REQUEST);
} else if (pref instanceof FingerprintPreference) { } else if (pref instanceof FingerprintPreference) {