Fix back navigation in biometric enrollment.

Using the back buttons can cause a crash in at least two cases. Skipping
face enrollment and then starting/stopping any enrollment can lead to
an invalid token and failed HAT request. Backing out of the activity and
restarting it can also lead to using a stale token that fails.

Fix: 179336333
Test: manual on device
Change-Id: I0c1133e4c3d9c97997043ddc9374aa3cfc4f1c97
This commit is contained in:
Joe Bolinger
2021-05-04 10:35:24 -07:00
parent cc28a0826e
commit 43d978bd7b
5 changed files with 16 additions and 14 deletions

View File

@@ -114,9 +114,6 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
mToken = BiometricUtils.requestGatekeeperHat(this, getIntent(), mUserId, challenge);
mSensorId = sensorId;
mChallenge = challenge;
if (BiometricUtils.isMultiBiometricEnrollmentFlow(this)) {
BiometricUtils.removeGatekeeperPasswordHandle(this, getIntent());
}
mFooterBarMixin.getPrimaryButton().setEnabled(true);
});
}