diff options
author | Elliott Hughes <enh@google.com> | 2014-10-23 11:06:43 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-10-23 11:06:43 -0700 |
commit | 85f60d3a03b5b5d9a0e8b8a138eb85a6b53a1eca (patch) | |
tree | 0544ed0121841498d586d2e3a9dfd1bd25b69325 /core | |
parent | fb9ac4c2d358278f9387b9518d5d1321f20c0e8c (diff) | |
download | frameworks_base-85f60d3a03b5b5d9a0e8b8a138eb85a6b53a1eca.zip frameworks_base-85f60d3a03b5b5d9a0e8b8a138eb85a6b53a1eca.tar.gz frameworks_base-85f60d3a03b5b5d9a0e8b8a138eb85a6b53a1eca.tar.bz2 |
Migrate off timeFormat12 and timeFormat24.
libcore now offers a wider variety of 12-/24-hour time formats,
so be more specific about which one we want here.
Bug: 10361358
Change-Id: I846ab7a6f84cd49e876ad21e9366aff1600e0530
Diffstat (limited to 'core')
-rwxr-xr-x | core/java/android/text/format/DateFormat.java | 2 | ||||
-rw-r--r-- | core/java/android/widget/TextClock.java | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java index 9fec9a1..d48f551 100755 --- a/core/java/android/text/format/DateFormat.java +++ b/core/java/android/text/format/DateFormat.java @@ -216,7 +216,7 @@ public class DateFormat { */ public static String getTimeFormatString(Context context) { LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale); - return is24HourFormat(context) ? d.timeFormat24 : d.timeFormat12; + return is24HourFormat(context) ? d.timeFormat_Hm : d.timeFormat_hm; } /** diff --git a/core/java/android/widget/TextClock.java b/core/java/android/widget/TextClock.java index 4c5c71d..1a86809 100644 --- a/core/java/android/widget/TextClock.java +++ b/core/java/android/widget/TextClock.java @@ -226,10 +226,10 @@ public class TextClock extends TextView { if (mFormat12 == null || mFormat24 == null) { LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale); if (mFormat12 == null) { - mFormat12 = ld.timeFormat12; + mFormat12 = ld.timeFormat_hm; } if (mFormat24 == null) { - mFormat24 = ld.timeFormat24; + mFormat24 = ld.timeFormat_Hm; } } @@ -433,9 +433,9 @@ public class TextClock extends TextView { LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale); if (format24Requested) { - mFormat = abc(mFormat24, mFormat12, ld.timeFormat24); + mFormat = abc(mFormat24, mFormat12, ld.timeFormat_Hm); } else { - mFormat = abc(mFormat12, mFormat24, ld.timeFormat12); + mFormat = abc(mFormat12, mFormat24, ld.timeFormat_hm); } boolean hadSeconds = mHasSeconds; |