summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/TextClock.java
diff options
context:
space:
mode:
authorChristopher R. Palmer <crpalmer@gmail.com>2015-05-11 04:57:19 -0400
committerSteve Kondik <steve@cyngn.com>2015-10-26 21:55:42 -0700
commit371ef19c1424c4bfb50a8d83b43d1f107d9a0456 (patch)
tree450f8c0646fc9965b39e5507e605d503cf0613c6 /core/java/android/widget/TextClock.java
parentc8fe229c37da55405720e631ddae9b8c95b10008 (diff)
downloadframeworks_base-371ef19c1424c4bfb50a8d83b43d1f107d9a0456.zip
frameworks_base-371ef19c1424c4bfb50a8d83b43d1f107d9a0456.tar.gz
frameworks_base-371ef19c1424c4bfb50a8d83b43d1f107d9a0456.tar.bz2
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
Diffstat (limited to 'core/java/android/widget/TextClock.java')
-rw-r--r--core/java/android/widget/TextClock.java1
1 files changed, 1 insertions, 0 deletions
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());
}