Use allowPrivateProfile to guard BiometricFragment changes

The BiometricPrompt API setAllowBackgroundAuthentication is
now guarded by allowPrivateProfile flag. This change ensures the
references to this API are flagged by the same flag, and the uber
private space implementation flag - enablePrivateSpaceFeatures, as
well.

Bug: 312184187
Test: Tested by flashing changes on a test device
Flag: Flags.ALLOW_PRIVATE_PROFILE
Change-Id: Icfdc5a2c2f07177c25fa3d545837052209b76551
This commit is contained in:
Jigar Thakkar
2024-03-26 16:02:33 +00:00
parent 6263205fa8
commit eb612580d8

View File

@@ -143,7 +143,8 @@ public class BiometricFragment extends InstrumentedFragment {
.setShowEmergencyCallButton(promptInfo.isShowEmergencyCallButton())
.setReceiveSystemEvents(true);
if (Flags.enableBiometricsToUnlockPrivateSpace()) {
if (android.os.Flags.allowPrivateProfile() && Flags.enablePrivateSpaceFeatures()
&& Flags.enableBiometricsToUnlockPrivateSpace()) {
promptBuilder = promptBuilder.setAllowBackgroundAuthentication(true /* allow */,
promptInfo.shouldUseParentProfileForDeviceCredential());
} else {