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

Commit c468d85e authored by Beverly's avatar Beverly
Browse files

Don't update persistent msgs when dozing

Else, we'll keep unnecessarily waking up the
device.

Test: atest SystemUITests
Fixes: 218445866
Change-Id: I28d8358b7bab8dce64755f5aa2e8175e3e103121
parent c7d665b1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
            }
        }
    };
+4 −1
Original line number Diff line number Diff line
@@ -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();