From 371ef19c1424c4bfb50a8d83b43d1f107d9a0456 Mon Sep 17 00:00:00 2001 From: "Christopher R. Palmer" Date: Mon, 11 May 2015 04:57:19 -0400 Subject: textclock: Update the time when performing a doze pulse Prior to this commit if your phone is deep sleeping then the TIME_TICK intents are not necessarily being delivered to the clock until you exit dreaming. This provides a poor UI when the clock is shown for a doze pulse (ambient display). For example, I often see the time change by 2-3 minutes (and up to 5 of more) when I simply touch the screen when it is doing a doze pulse. That change is caused by the ticks finally getting registered and but doesn't necessarily happen while still dreaming. This defeats one useful purpose of the ambient display which is to use it to see the current time. Change-Id: Ib6eb656b0aea21b09f2778c8138f39c4ab11337f --- core/java/android/widget/TextClock.java | 1 + 1 file changed, 1 insertion(+) (limited to 'core/java/android/widget') diff --git a/core/java/android/widget/TextClock.java b/core/java/android/widget/TextClock.java index bcde315..d5a3f16 100644 --- a/core/java/android/widget/TextClock.java +++ b/core/java/android/widget/TextClock.java @@ -548,6 +548,7 @@ public class TextClock extends TextView { filter.addAction(Intent.ACTION_TIME_TICK); filter.addAction(Intent.ACTION_TIME_CHANGED); filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); + filter.addAction(Intent.ACTION_DOZE_PULSE_STARTING); getContext().registerReceiver(mIntentReceiver, filter, null, getHandler()); } -- cgit v1.1