Add mandatory biometric prompt to platform surfaces (5/N)
1. For biometric settings, request biometric prompt only after successful credential verification and no auth request after enrollment 2. Differentiate between mandatory biometrics ineffective error and other biometric errors Flag: android.hardware.biometrics.flags.mandatory_biometrics Bug: 358176202 Bug: 358179610 Test: atest UtilsTest DevelopmentSettingsDashboardFragmentTest MainClearTest BuildNumberPreferenceControllerTest CombinedBiometricProfileSettingsTest Change-Id: I778dd5403dd5ab64d8cc39bd88b22c4d39182e94
This commit is contained in:
@@ -491,11 +491,16 @@ public class ChooseLockGeneric extends SettingsActivity {
|
||||
? data.getParcelableExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD)
|
||||
: null;
|
||||
updatePreferencesOrFinish(false /* isRecreatingActivity */);
|
||||
if (Utils.requestBiometricAuthenticationForMandatoryBiometrics(getContext(),
|
||||
mBiometricsAuthSuccessful, mWaitingForConfirmation, mUserId)) {
|
||||
mWaitingForConfirmation = true;
|
||||
Utils.launchBiometricPromptForMandatoryBiometrics(this, BIOMETRIC_AUTH_REQUEST,
|
||||
final Utils.BiometricStatus biometricAuthStatus =
|
||||
Utils.requestBiometricAuthenticationForMandatoryBiometrics(getActivity(),
|
||||
false /* biometricsAuthenticationRequested */,
|
||||
mUserId);
|
||||
if (biometricAuthStatus == Utils.BiometricStatus.OK) {
|
||||
Utils.launchBiometricPromptForMandatoryBiometrics(this,
|
||||
BIOMETRIC_AUTH_REQUEST,
|
||||
mUserId, true /* hideBackground */);
|
||||
} else if (biometricAuthStatus != Utils.BiometricStatus.NOT_ACTIVE) {
|
||||
finish();
|
||||
}
|
||||
} else if (requestCode == BIOMETRIC_AUTH_REQUEST) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
|
||||
Reference in New Issue
Block a user