Merge "Trigger new frame after display is ready to turn on" into pi-dev
This commit is contained in:
@@ -407,6 +407,15 @@ public class TextClock extends TextView {
|
||||
registerObserver();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the displayed time if necessary and invalidate the view.
|
||||
* @hide
|
||||
*/
|
||||
public void refresh() {
|
||||
onTimeChanged();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the system is currently using the 24-hour mode.
|
||||
*
|
||||
|
||||
@@ -216,8 +216,7 @@ public class KeyguardStatusView extends GridLayout {
|
||||
}
|
||||
|
||||
public void refreshTime() {
|
||||
mClockView.setFormat12Hour(Patterns.clockView12);
|
||||
mClockView.setFormat24Hour(Patterns.clockView24);
|
||||
mClockView.refresh();
|
||||
}
|
||||
|
||||
private void refresh() {
|
||||
|
||||
@@ -109,7 +109,11 @@ public class DozeUi implements DozeMachine.Part {
|
||||
switch (newState) {
|
||||
case DOZE_AOD:
|
||||
if (oldState == DOZE_AOD_PAUSED) {
|
||||
// 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();
|
||||
// The first frame may arrive when the display isn't ready yet.
|
||||
mHandler.postDelayed(mHost::dozeTimeTick, 100);
|
||||
}
|
||||
scheduleTimeTick();
|
||||
break;
|
||||
|
||||
@@ -23,7 +23,7 @@ import android.os.Handler;
|
||||
*/
|
||||
public class DelayedWakeLock implements WakeLock {
|
||||
|
||||
private static final long RELEASE_DELAY_MS = 240;
|
||||
private static final long RELEASE_DELAY_MS = 140;
|
||||
|
||||
private final Handler mHandler;
|
||||
private final WakeLock mInner;
|
||||
|
||||
Reference in New Issue
Block a user