Update ParentalControlsUtils to use a new utility that is able to retrieve the component for the EnforcedAdmin.
Bug: 382038943 Flag: android.app.supervision.flags.deprecate_dpm_supervision_apis Test: atest ParentalControlsUtilsTest Change-Id: Ic2ecf644f2966bbe2e29c4a691db9e004f0d6a0e
This commit is contained in:
@@ -178,6 +178,7 @@ public class FaceSafetySourceTest {
|
||||
@EnableFlags(android.app.supervision.flags.Flags.FLAG_DEPRECATE_DPM_SUPERVISION_APIS)
|
||||
public void setSafetySourceData_withFaceNotEnrolled_whenSupervisionIsOn_setsData() {
|
||||
when(mSupervisionManager.isSupervisionEnabledForUser(USER_ID)).thenReturn(true);
|
||||
when(mSupervisionManager.getActiveSupervisionAppPackage()).thenReturn("supervision.pkg");
|
||||
when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(true);
|
||||
when(mFaceManager.isHardwareDetected()).thenReturn(true);
|
||||
when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false);
|
||||
@@ -228,6 +229,7 @@ public class FaceSafetySourceTest {
|
||||
@EnableFlags(android.app.supervision.flags.Flags.FLAG_DEPRECATE_DPM_SUPERVISION_APIS)
|
||||
public void setSafetySourceData_withFaceEnrolled_whenSupervisionIsOn_setsData() {
|
||||
when(mSupervisionManager.isSupervisionEnabledForUser(USER_ID)).thenReturn(true);
|
||||
when(mSupervisionManager.getActiveSupervisionAppPackage()).thenReturn("supervision.pkg");
|
||||
when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(true);
|
||||
when(mFaceManager.isHardwareDetected()).thenReturn(true);
|
||||
when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true);
|
||||
|
Reference in New Issue
Block a user