summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TextClock.java
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2018-04-05 22:20:44 -0700
committerLucas Dupin <dupin@google.com>2018-04-05 22:20:44 -0700
commitf9583c41dce46321bdcd9cea7045a5bedbe0d59d (patch)
tree35cafd3526673e99bfd7551757c53d82ba261a21 /core/java/android/widget/TextClock.java
parent271ba383b6bfa07a97e4f5dd65a89679e0270bd7 (diff)
Trigger new frame after display is ready to turn on
Making sure that a frame will be pushed after the display is ready to turn on by invaliding the clock after a delay. Also removed unecessary binder call. Test: cover prox sensor and wait 1 minute. repeat ~10 times Change-Id: Ic1b8006781e5486822a5ab65b71b3c44980f2f16 Fixes: 71913808
Diffstat (limited to 'core/java/android/widget/TextClock.java')
-rw-r--r--core/java/android/widget/TextClock.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/widget/TextClock.java b/core/java/android/widget/TextClock.java
index 53318c99ac34..d8a9ccad3f2e 100644
--- a/core/java/android/widget/TextClock.java
+++ b/core/java/android/widget/TextClock.java
@@ -408,6 +408,15 @@ public class TextClock extends TextView {
}
/**
+ * 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.
*
* When the system is in 24-hour mode, this view will use the pattern