Add mandatory biometric prompt to platform surfaces (2/N)
1. Factory reset Flag: android.hardware.biometrics.Flags.MANDATORY_BIOMETRICS Bug: 339910718 Test: atest MainClearTest Change-Id: I7216f991a2550197c520af860da67f8452cff323
This commit is contained in:
@@ -99,6 +99,7 @@ public class MainClear extends InstrumentedFragment implements OnGlobalLayoutLis
|
||||
static final int KEYGUARD_REQUEST = 55;
|
||||
@VisibleForTesting
|
||||
static final int CREDENTIAL_CONFIRM_REQUEST = 56;
|
||||
static final int BIOMETRICS_REQUEST = 57;
|
||||
private static final String KEY_SHOW_ESIM_RESET_CHECKBOX =
|
||||
"masterclear.allow_retain_esim_profiles_after_fdr";
|
||||
|
||||
@@ -156,7 +157,8 @@ public class MainClear extends InstrumentedFragment implements OnGlobalLayoutLis
|
||||
|
||||
@VisibleForTesting
|
||||
boolean isValidRequestCode(int requestCode) {
|
||||
return !((requestCode != KEYGUARD_REQUEST) && (requestCode != CREDENTIAL_CONFIRM_REQUEST));
|
||||
return !((requestCode != KEYGUARD_REQUEST) && (requestCode != CREDENTIAL_CONFIRM_REQUEST)
|
||||
&& (requestCode != BIOMETRICS_REQUEST));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -179,9 +181,18 @@ public class MainClear extends InstrumentedFragment implements OnGlobalLayoutLis
|
||||
return;
|
||||
}
|
||||
|
||||
if (requestCode == KEYGUARD_REQUEST) {
|
||||
if (Utils.requestBiometricAuthenticationForMandatoryBiometrics(getActivity(),
|
||||
false /* biometricsSuccessfullyAuthenticated */,
|
||||
false /* biometricsAuthenticationRequested */)) {
|
||||
Utils.launchBiometricPromptForMandatoryBiometrics(this, BIOMETRICS_REQUEST);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Intent intent = null;
|
||||
// If returning from a Keyguard request, try to show an account confirmation request if
|
||||
// applciable.
|
||||
// applicable.
|
||||
if (CREDENTIAL_CONFIRM_REQUEST != requestCode
|
||||
&& (intent = getAccountConfirmationIntent()) != null) {
|
||||
showAccountCredentialConfirmation(intent);
|
||||
|
Reference in New Issue
Block a user