Fix incorrect choose screen lock during unicorn

ChooseLockGeneneric uses intent extra key to determine correct strings
on "Choose screen lock" screen.

Bug: 219419005
Test: atest BiometricEnrollActivityTest
Test: Manully test SUW as following combinations
      1. W/ unicorn flow or W/O unicorn flow
      2. Fingerprint only devices or Fingerpirnt+Face devices
Change-Id: I2abf9555676f3fb3b92dd6ddcc091ea8158bfe9f
This commit is contained in:
Milton Wu
2022-09-07 16:31:46 +00:00
parent 17122f9617
commit 4f93ef7790
2 changed files with 20 additions and 4 deletions

View File

@@ -564,7 +564,13 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
Intent intent = BiometricUtils.getChooseLockIntent(this, getIntent());
intent.putExtra(ChooseLockGeneric.ChooseLockGenericFragment.HIDE_INSECURE_OPTIONS, true);
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_REQUEST_GK_PW_HANDLE, true);
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_FOR_BIOMETRICS, true);
if (mHasFeatureFingerprint && mHasFeatureFace) {
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_FOR_BIOMETRICS, true);
} else if (mHasFeatureFace) {
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_FOR_FACE, true);
} else if (mHasFeatureFingerprint) {
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_FOR_FINGERPRINT, true);
}
if (mUserId != UserHandle.USER_NULL) {
intent.putExtra(Intent.EXTRA_USER_ID, mUserId);