Merge "Don't update persistent msgs when dozing"

This commit is contained in:
TreeHugger Robot
2022-02-17 22:27:01 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 3 deletions

View File

@@ -327,7 +327,9 @@ public class KeyguardIndicationController {
private void updateOrganizedOwnedDevice() {
// avoid calling this method since it has an IPC
mOrganizationOwnedDevice = whitelistIpcs(this::isOrganizationOwnedDevice);
updatePersistentIndications(false, KeyguardUpdateMonitor.getCurrentUser());
if (!mDozing) {
updateDisclosure();
}
}
private void updateDisclosure() {
@@ -1185,7 +1187,7 @@ public class KeyguardIndicationController {
mTopIndicationView.clearMessages();
mRotateTextViewController.clearMessages();
} else {
updatePersistentIndications(false, KeyguardUpdateMonitor.getCurrentUser());
updateIndication(false);
}
}
};

View File

@@ -779,8 +779,11 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase {
public void testOnKeyguardShowingChanged_showing_updatesPersistentMessages() {
createController();
// GIVEN keyguard is showing
// GIVEN keyguard is showing and not dozing
when(mKeyguardStateController.isShowing()).thenReturn(true);
mController.setVisible(true);
mExecutor.runAllReady();
reset(mRotateTextViewController);
// WHEN keyguard showing changed called
mKeyguardStateControllerCallback.onKeyguardShowingChanged();