Disable shade open when FRP is active

Bug: 267313135
Test: manual and presubmits. added unit test.
Change-Id: Id3a155a2ac821620619d4b36904d132b76a6fde8
This commit is contained in:
Justin Weir
2023-03-06 15:48:12 -05:00
parent 5994af686b
commit 421cf7df11
2 changed files with 11 additions and 1 deletions

View File

@@ -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);
}

View File

@@ -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.