Don't surface BiometricsSafetySource for private profile
The biometric lock for pirvate profile is handled separately. Bug: 286539356 Test: manual Change-Id: Iec0a98a40f0ff0c303f450a340720782a4e37f00
This commit is contained in:
@@ -62,6 +62,16 @@ public final class BiometricsSafetySource {
|
|||||||
}
|
}
|
||||||
final Context profileParentContext =
|
final Context profileParentContext =
|
||||||
context.createContextAsUser(profileParentUserHandle, 0);
|
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 =
|
final BiometricNavigationUtils biometricNavigationUtils =
|
||||||
new BiometricNavigationUtils(userId);
|
new BiometricNavigationUtils(userId);
|
||||||
|
@@ -22,6 +22,8 @@ import android.safetycenter.SafetyEvent;
|
|||||||
import android.safetycenter.SafetySourceData;
|
import android.safetycenter.SafetySourceData;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.android.internal.annotations.VisibleForTesting;
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
|
|
||||||
/** A wrapper for the SafetyCenterManager system service. */
|
/** A wrapper for the SafetyCenterManager system service. */
|
||||||
@@ -49,7 +51,7 @@ public class SafetyCenterManagerWrapper {
|
|||||||
|
|
||||||
/** Sets the latest safety source data for Safety Center. */
|
/** Sets the latest safety source data for Safety Center. */
|
||||||
public void setSafetySourceData(Context context, String safetySourceId,
|
public void setSafetySourceData(Context context, String safetySourceId,
|
||||||
SafetySourceData safetySourceData,
|
@Nullable SafetySourceData safetySourceData,
|
||||||
SafetyEvent safetyEvent) {
|
SafetyEvent safetyEvent) {
|
||||||
SafetyCenterManager safetyCenterManager =
|
SafetyCenterManager safetyCenterManager =
|
||||||
context.getSystemService(SafetyCenterManager.class);
|
context.getSystemService(SafetyCenterManager.class);
|
||||||
|
Reference in New Issue
Block a user