Do not request confirmation by default for private space unlocks

Fix face unlock confirmation button behavior to respect "always
require confirmation" setting. Adjust the description of the
confirmation toggle in private space face unlock settings to
reflect this change.
Screenshot: https://screenshot.googleplex.com/4uHfm9Z3ZE56ZaT.png

Bug: 342383195
Test: Tested manually by flashing local build
Change-Id: I0f742839a862fe66cacad9f5704dbe8b0df3a0c2
This commit is contained in:
Jigar Thakkar
2024-05-24 15:11:46 +00:00
parent 9bc1bc3c39
commit 176f1a630a
3 changed files with 14 additions and 1 deletions

View File

@@ -313,7 +313,7 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
mForceVerifyPath = userProperties.isCredentialShareableWithParent();
if (android.multiuser.Flags.enableBiometricsToUnlockPrivateSpace()
&& isBiometricAllowed(effectiveUserId, mUserId)) {
promptInfo.setUseParentProfileForDeviceCredential(true);
setBiometricPromptPropertiesForPrivateProfile(promptInfo);
showBiometricPrompt(promptInfo, effectiveUserId);
launchedBiometric = true;
} else {
@@ -344,6 +344,11 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
}
}
private static void setBiometricPromptPropertiesForPrivateProfile(PromptInfo promptInfo) {
promptInfo.setUseParentProfileForDeviceCredential(true);
promptInfo.setConfirmationRequested(false);
}
private String getTitleFromCredentialType(@LockPatternUtils.CredentialType int credentialType,
boolean isEffectiveUserManagedProfile) {
switch (credentialType) {