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

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

Merge "Fix DevicePolicyManagerTest#testSetSecondaryLockscreenEnabled test." into main

parents 64973989 78169df0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5036,8 +5036,6 @@ public class DevicePolicyManagerTest extends DpmTestBase {
    @Test
    @RequiresFlagsEnabled(Flags.FLAG_SECONDARY_LOCKSCREEN_API_ENABLED)
    public void testSetSecondaryLockscreenEnabled() throws Exception {
        mContext.binder.callingUid = DpmMockContext.CALLER_UID;

        verifySetSecondaryLockscreenEnabled(false);
        verifySetSecondaryLockscreenEnabled(true);
    }
@@ -5045,6 +5043,10 @@ public class DevicePolicyManagerTest extends DpmTestBase {
    private void verifySetSecondaryLockscreenEnabled(boolean enabled) throws Exception {
        reset(getServices().supervisionManagerInternal);

        mContext.binder.callingUid = DpmMockContext.CALLER_UID;
        doReturn(DpmMockContext.CALLER_UID).when(getServices().packageManagerInternal)
                .getPackageUid(any(), anyLong(), anyInt());

        dpm.setSecondaryLockscreenEnabled(admin1, enabled);
        verify(getServices().supervisionManagerInternal).setSupervisionLockscreenEnabledForUser(
                CALLER_USER_HANDLE, enabled, null);