Implement “Set up Face or Fingerprint Unlock first” page

The activity which instructs the user to set up face or fingerprint unlock before setting the watch unlock

Bug: 264813445
Bug: 264962961
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ActiveUnlockRequireBiometricSetupTest
Change-Id: I556c62b6b8102f6e15045a37cf506c0c0eedf733
This commit is contained in:
yuanjiahsu
2023-01-13 08:47:49 +08:00
committed by Derek Jedral
parent 9134f24f31
commit 06466b030b
5 changed files with 276 additions and 1 deletions

View File

@@ -495,7 +495,13 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
@Override
public void finish() {
if (mGkPwHandle != null) {
BiometricUtils.removeGatekeeperPasswordHandle(this, mGkPwHandle);
// When launched as InternalActivity, the mGkPwHandle was gotten from intent extra
// instead of requesting from the user. Do not remove the mGkPwHandle in service side
// for this case because the caller activity may still need it and will be responsible
// for removing it.
if (!(this instanceof InternalActivity)) {
BiometricUtils.removeGatekeeperPasswordHandle(this, mGkPwHandle);
}
}
super.finish();
}