From eb612580d86b916266232ede91809c3f663bbcdd Mon Sep 17 00:00:00 2001 From: Jigar Thakkar Date: Tue, 26 Mar 2024 16:02:33 +0000 Subject: [PATCH] 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 --- src/com/android/settings/password/BiometricFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/password/BiometricFragment.java b/src/com/android/settings/password/BiometricFragment.java index 90a1feba1f1..2e4a317cbaf 100644 --- a/src/com/android/settings/password/BiometricFragment.java +++ b/src/com/android/settings/password/BiometricFragment.java @@ -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 {