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

Commit 421cf7df authored by Justin Weir's avatar Justin Weir
Browse files

Disable shade open when FRP is active

Bug: 267313135
Test: manual and presubmits. added unit test.
Change-Id: Id3a155a2ac821620619d4b36904d132b76a6fde8
parent 5994af68
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3571,7 +3571,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        boolean goingToSleepWithoutAnimation = isGoingToSleep()
                && !mDozeParameters.shouldControlScreenOff();
        boolean disabled = (!mDeviceInteractive && !mDozeServiceHost.isPulsing())
                || goingToSleepWithoutAnimation;
                || goingToSleepWithoutAnimation
                || mDeviceProvisionedController.isFrpActive();
        mNotificationPanelViewController.setTouchAndAnimationDisabled(disabled);
        mNotificationIconAreaController.setAnimationsEnabled(!disabled);
    }
+9 −0
Original line number Diff line number Diff line
@@ -1259,6 +1259,15 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
        verify(mPowerManagerService, never()).wakeUp(anyLong(), anyInt(), anyString(), anyString());
    }

    @Test
    public void frpLockedDevice_shadeDisabled() {
        when(mDeviceProvisionedController.isFrpActive()).thenReturn(true);
        when(mDozeServiceHost.isPulsing()).thenReturn(true);
        mCentralSurfaces.updateNotificationPanelTouchState();

        verify(mNotificationPanelViewController).setTouchAndAnimationDisabled(true);
    }

    /**
     * Configures the appropriate mocks and then calls {@link CentralSurfacesImpl#updateIsKeyguard}
     * to reconfigure the keyguard to reflect the requested showing/occluded states.