Examine widget hierarchy to find clocks.
When switching to a widget, examine its hierarchy to determine if it
contains TextClocks that show hour and minute for the local timezone.
If so, hide the status bar clock. Doesn't fix closing walls.
Bug: 7667638
Change-Id: I1e2c40345c9e5eb0193efd70838c7ca9f779190b
diff --git a/core/java/android/widget/TextClock.java b/core/java/android/widget/TextClock.java
index 290d9b5..5bf21c0 100644
--- a/core/java/android/widget/TextClock.java
+++ b/core/java/android/widget/TextClock.java
@@ -386,6 +386,16 @@
}
/**
+ * Returns the current format string. Always valid after constructor has
+ * finished, and will never be {@code null}.
+ *
+ * @hide
+ */
+ public CharSequence getFormat() {
+ return mFormat;
+ }
+
+ /**
* Selects either one of {@link #getFormat12Hour()} or {@link #getFormat24Hour()}
* depending on whether the user has selected 24-hour format.
*