Merge "Migrate off timeFormat12 and timeFormat24."

This commit is contained in:
Elliott Hughes
2014-10-23 18:21:56 +00:00
committed by Gerrit Code Review
3 changed files with 6 additions and 6 deletions

View File

@ -216,7 +216,7 @@ public class DateFormat {
*/ */
public static String getTimeFormatString(Context context) { public static String getTimeFormatString(Context context) {
LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale); LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale);
return is24HourFormat(context) ? d.timeFormat24 : d.timeFormat12; return is24HourFormat(context) ? d.timeFormat_Hm : d.timeFormat_hm;
} }
/** /**

View File

@ -222,10 +222,10 @@ public class TextClock extends TextView {
if (mFormat12 == null || mFormat24 == null) { if (mFormat12 == null || mFormat24 == null) {
LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale); LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale);
if (mFormat12 == null) { if (mFormat12 == null) {
mFormat12 = ld.timeFormat12; mFormat12 = ld.timeFormat_hm;
} }
if (mFormat24 == null) { if (mFormat24 == null) {
mFormat24 = ld.timeFormat24; mFormat24 = ld.timeFormat_Hm;
} }
} }
@ -429,9 +429,9 @@ public class TextClock extends TextView {
LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale); LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale);
if (format24Requested) { if (format24Requested) {
mFormat = abc(mFormat24, mFormat12, ld.timeFormat24); mFormat = abc(mFormat24, mFormat12, ld.timeFormat_Hm);
} else { } else {
mFormat = abc(mFormat12, mFormat24, ld.timeFormat12); mFormat = abc(mFormat12, mFormat24, ld.timeFormat_hm);
} }
boolean hadSeconds = mHasSeconds; boolean hadSeconds = mHasSeconds;

View File

@ -138,7 +138,7 @@ public class Clock extends TextView implements DemoMode {
final char MAGIC2 = '\uEF01'; final char MAGIC2 = '\uEF01';
SimpleDateFormat sdf; SimpleDateFormat sdf;
String format = is24 ? d.timeFormat24 : d.timeFormat12; String format = is24 ? d.timeFormat_Hm : d.timeFormat_hm;
if (!format.equals(mClockFormatString)) { if (!format.equals(mClockFormatString)) {
/* /*
* Search for an unquoted "a" in the format string, so we can * Search for an unquoted "a" in the format string, so we can