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

Commit 3207f127 authored by Manish Singh's avatar Manish Singh Committed by Android (Google) Code Review
Browse files

Merge "Don't surface BiometricsSafetySource for private profile" into main

parents 3ed1950a 7e1a9138
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -62,6 +62,16 @@ public final class BiometricsSafetySource {
        }
        final Context profileParentContext =
                context.createContextAsUser(profileParentUserHandle, 0);
        if (android.os.Flags.allowPrivateProfile() && userManager.isPrivateProfile()) {
            // SC always expects a response from the source if the broadcast has been sent for this
            // source, therefore, we need to send a null SafetySourceData.
            SafetyCenterManagerWrapper.get().setSafetySourceData(
                    context,
                    SAFETY_SOURCE_ID,
                    /* safetySourceData= */ null,
                    safetyEvent);
            return;
        }

        final BiometricNavigationUtils biometricNavigationUtils =
                new BiometricNavigationUtils(userId);
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ import android.safetycenter.SafetyEvent;
import android.safetycenter.SafetySourceData;
import android.util.Log;

import androidx.annotation.Nullable;

import com.android.internal.annotations.VisibleForTesting;

/** A wrapper for the SafetyCenterManager system service. */
@@ -49,7 +51,7 @@ public class SafetyCenterManagerWrapper {

    /** Sets the latest safety source data for Safety Center. */
    public void setSafetySourceData(Context context, String safetySourceId,
            SafetySourceData safetySourceData,
            @Nullable SafetySourceData safetySourceData,
            SafetyEvent safetyEvent) {
        SafetyCenterManager safetyCenterManager =
                context.getSystemService(SafetyCenterManager.class);