Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ced7ebdb authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "Migrate off timeFormat12 and timeFormat24."

parents 2bf3800b f7d5e0a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
    }

    /**
+4 −4
Original line number Diff line number Diff line
@@ -222,10 +222,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;
            }
        }

@@ -429,9 +429,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;
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ public class Clock extends TextView implements DemoMode {
        final char MAGIC2 = '\uEF01';

        SimpleDateFormat sdf;
        String format = is24 ? d.timeFormat24 : d.timeFormat12;
        String format = is24 ? d.timeFormat_Hm : d.timeFormat_hm;
        if (!format.equals(mClockFormatString)) {
            /*
             * Search for an unquoted "a" in the format string, so we can