summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2019-07-19 11:45:16 -0700
committer Lucas Dupin <dupin@google.com> 2019-07-19 11:45:16 -0700
commitbb83b895450257b602bc6ac40f93de64e32006e1 (patch)
treedd397835e754668aee59376fc6e1f62616c5e5c4
parent32cc70651986a3e08fa76a92dec8e3e84c1e1fa8 (diff)
Update clock when turning the screen on
Sensors might disable the screen, setting the machine state to DOZE. We need to update the clock when the screen turns on. Fixes: 137943236 Test: turn off screen with sensor, wait for a few minutes, come back Change-Id: I633568294aa24bfea6765accc08ccf23f9c6bec1
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeUi.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
index e877d4446c63..1f33af8c3f55 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
@@ -16,6 +16,7 @@
package com.android.systemui.doze;
+import static com.android.systemui.doze.DozeMachine.State.DOZE;
import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD_PAUSED;
import android.app.AlarmManager;
@@ -116,7 +117,7 @@ public class DozeUi implements DozeMachine.Part {
public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) {
switch (newState) {
case DOZE_AOD:
- if (oldState == DOZE_AOD_PAUSED) {
+ if (oldState == DOZE_AOD_PAUSED || oldState == DOZE) {
// Whenever turning on the display, it's necessary to push a new frame.
// The display buffers will be empty and need to be filled.
mHost.dozeTimeTick();