Disable shade open when FRP is active
Bug: 267313135 Test: manual and presubmits. added unit test. Change-Id: Id3a155a2ac821620619d4b36904d132b76a6fde8
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user