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

Commit 8f0c7f63 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use parent profile for device credential" into main

parents f1c1e011 f7ffa201
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.hardware.biometrics.BiometricPrompt;
import android.hardware.biometrics.BiometricPrompt.AuthenticationCallback;
import android.hardware.biometrics.BiometricPrompt.AuthenticationResult;
import android.hardware.biometrics.PromptInfo;
import android.multiuser.Flags;
import android.os.Bundle;
import android.os.CancellationSignal;

@@ -140,8 +141,14 @@ public class BiometricFragment extends InstrumentedFragment {
                .setDisallowBiometricsIfPolicyExists(
                        promptInfo.isDisallowBiometricsIfPolicyExists())
                .setShowEmergencyCallButton(promptInfo.isShowEmergencyCallButton())
                .setReceiveSystemEvents(true)
                .setAllowBackgroundAuthentication(true);
                .setReceiveSystemEvents(true);

        if (Flags.enableBiometricsToUnlockPrivateSpace()) {
            promptBuilder = promptBuilder.setAllowBackgroundAuthentication(true /* allow */,
                    promptInfo.shouldUseParentProfileForDeviceCredential());
        } else {
            promptBuilder = promptBuilder.setAllowBackgroundAuthentication(true /* allow */);
        }

        // Check if the default subtitle should be used if subtitle is null/empty
        if (promptInfo.isUseDefaultSubtitle()) {
+1 −0
Original line number Diff line number Diff line
@@ -311,6 +311,7 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
            mForceVerifyPath = userProperties.isCredentialShareableWithParent();
            if (android.multiuser.Flags.enableBiometricsToUnlockPrivateSpace()
                    && isBiometricAllowed(effectiveUserId, mUserId)) {
                promptInfo.setUseParentProfileForDeviceCredential(true);
                showBiometricPrompt(promptInfo, effectiveUserId);
                launchedBiometric = true;
            } else {