commit | c468d85edb7efa387ed0a12d2f812d2df0a8994d | [log] [tgz] |
---|---|---|
author | Beverly <beverlyt@google.com> | Thu Feb 17 16:47:25 2022 +0000 |
committer | Beverly <beverlyt@google.com> | Thu Feb 17 18:44:55 2022 +0000 |
tree | 85049cad39cc9c41420b2ee2611a14f91e6b8c1a | |
parent | c7d665b13d3363d35b242e9f21ad4feb44bd4425 [diff] |
Don't update persistent msgs when dozing Else, we'll keep unnecessarily waking up the device. Test: atest SystemUITests Fixes: 218445866 Change-Id: I28d8358b7bab8dce64755f5aa2e8175e3e103121
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 0509a7c..7f43f9f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -327,7 +327,9 @@ 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 @@ mTopIndicationView.clearMessages(); mRotateTextViewController.clearMessages(); } else { - updatePersistentIndications(false, KeyguardUpdateMonitor.getCurrentUser()); + updateIndication(false); } } };
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java index 466d954..65271bc 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java
@@ -779,8 +779,11 @@ 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();