Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c226d4b9 authored by Austin Delgado's avatar Austin Delgado
Browse files

Add flag for biometric prompt to use effective user ID

Test: atest PreAuthInfoTest
Bug: 365094949
Flag: android.hardware.biometrics.effective_user_bp
Change-Id: Iede09fb89b31e49e6a561be056e76979cd9fd259
parent aa47b52c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -61,3 +61,13 @@ flag {
  description: "Feature flag for biometric prompt improvements in private space"
  bug: "365554098"
}

flag {
  name: "effective_user_bp"
  namespace: "biometrics_framework"
  description: "Feature flag for using effective user in biometric prompt"
  bug: "365094949"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ class PreAuthInfo {
        final List<Pair<BiometricSensor, Integer>> ineligibleSensors = new ArrayList<>();

        final int effectiveUserId;
        if (Flags.privateSpaceBp()) {
        if (Flags.effectiveUserBp()) {
            effectiveUserId = userManager.getCredentialOwnerProfile(userId);
        } else {
            effectiveUserId = userId;
+1 −1
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ public class PreAuthInfoTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_PRIVATE_SPACE_BP)
    @RequiresFlagsEnabled(Flags.FLAG_EFFECTIVE_USER_BP)
    public void testCredentialOwnerIdAsUserId() throws Exception {
        when(mUserManager.getCredentialOwnerProfile(USER_ID)).thenReturn(OWNER_ID);