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

Commit 9373911d authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Update time when turning on screen, in addition to waking up

When in ambient display mode, we didn't get a callback to
onStartedWakingUp, thus the time was never refreshed. Since
broadcasts are disabled in this low-power state, we need to refresh
the clock manually before turning on the screen, because we can't
rely on the broadcasts to be delivered.

Bug: 23171638
Change-Id: I249f4195a14995f7c1467e73ac2aa400b871f80e
parent ff9912d5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1564,6 +1564,7 @@ public class KeyguardViewMediator extends SystemUI {
    private void handleNotifyScreenTurningOn(IKeyguardDrawnCallback callback) {
        synchronized (KeyguardViewMediator.this) {
            if (DEBUG) Log.d(TAG, "handleNotifyScreenTurningOn");
            mStatusBarKeyguardViewManager.onScreenTurningOn();
            if (callback != null) {
                if (mWakeAndUnlocking) {
                    mDrawnCallback = callback;
+1 −1
Original line number Diff line number Diff line
@@ -2226,7 +2226,7 @@ public class NotificationPanelView extends PanelView implements
        }
    };

    public void onScreenTurnedOn() {
    public void onScreenTurningOn() {
        mKeyguardStatusView.refreshTime();
    }

+4 −1
Original line number Diff line number Diff line
@@ -3834,11 +3834,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
    public void onScreenTurnedOn() {
        mScreenOnFromKeyguard = true;
        mStackScroller.setAnimationsEnabled(true);
        mNotificationPanel.onScreenTurnedOn();
        mNotificationPanel.setTouchDisabled(false);
        updateVisibleToUser();
    }

    public void onScreenTurningOn() {
        mNotificationPanel.onScreenTurningOn();
    }

    /**
     * This handles long-press of both back and recents.  They are
     * handled together to capture them both being long-pressed
+4 −0
Original line number Diff line number Diff line
@@ -172,6 +172,10 @@ public class StatusBarKeyguardViewManager {
        mPhoneStatusBar.onScreenTurnedOn();
    }

    public void onScreenTurningOn() {
        mPhoneStatusBar.onScreenTurningOn();
    }

    public void onScreenTurnedOn() {
        mScreenTurnedOn = true;
        mWakeAndUnlocking = false;