diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java index 3c984b51fa4d1..cc676deece2e8 100644 --- a/core/java/android/text/format/DateFormat.java +++ b/core/java/android/text/format/DateFormat.java @@ -31,6 +31,8 @@ import java.util.Locale; import java.util.TimeZone; import java.text.SimpleDateFormat; +import libcore.icu.LocaleData; + /** Utility class for producing strings with formatted date/time. @@ -265,16 +267,9 @@ public class DateFormat { * @return the {@link java.text.DateFormat} object that properly formats the time. */ public static java.text.DateFormat getTimeFormat(Context context) { - boolean b24 = is24HourFormat(context); - int res; - - if (b24) { - res = R.string.twenty_four_hour_time_format; - } else { - res = R.string.twelve_hour_time_format; - } - - return new java.text.SimpleDateFormat(context.getString(res)); + LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale); + boolean is24 = is24HourFormat(context); + return new java.text.SimpleDateFormat(is24 ? d.timeFormat24 : d.timeFormat12); } /** diff --git a/core/java/android/widget/DateTimeView.java b/core/java/android/widget/DateTimeView.java index 6e6e4af2cf36b..af6bbcb5dad0b 100644 --- a/core/java/android/widget/DateTimeView.java +++ b/core/java/android/widget/DateTimeView.java @@ -189,15 +189,7 @@ public class DateTimeView extends TextView { } private DateFormat getTimeFormat() { - int res; - Context context = getContext(); - if (android.text.format.DateFormat.is24HourFormat(context)) { - res = R.string.twenty_four_hour_time_format; - } else { - res = R.string.twelve_hour_time_format; - } - String format = context.getString(res); - return new SimpleDateFormat(format); + return android.text.format.DateFormat.getTimeFormat(getContext()); } private DateFormat getDateFormat() { diff --git a/core/res/res/values-af/donottranslate-cldr.xml b/core/res/res/values-af/donottranslate-cldr.xml index 77b7f7cfbaeb7..ca693b69fb014 100644 --- a/core/res/res/values-af/donottranslate-cldr.xml +++ b/core/res/res/values-af/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %Y/%m/%d yyyy/MM/dd "%s/%s/%s" diff --git a/core/res/res/values-am/donottranslate-cldr.xml b/core/res/res/values-am/donottranslate-cldr.xml index b3b76f921fb74..a7cb1c7231123 100644 --- a/core/res/res/values-am/donottranslate-cldr.xml +++ b/core/res/res/values-am/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-ar-rEG/donottranslate-cldr.xml b/core/res/res/values-ar-rEG/donottranslate-cldr.xml index 155480da4592c..74807564c7c48 100644 --- a/core/res/res/values-ar-rEG/donottranslate-cldr.xml +++ b/core/res/res/values-ar-rEG/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %-e‏/%-m‏/%Y d‏/M‏/yyyy "%s‏/%s‏/%s" diff --git a/core/res/res/values-ar/donottranslate-cldr.xml b/core/res/res/values-ar/donottranslate-cldr.xml index 135963bf99863..44d8a2606a27b 100644 --- a/core/res/res/values-ar/donottranslate-cldr.xml +++ b/core/res/res/values-ar/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %-e‏/%-m‏/%Y d‏/M‏/yyyy "%s‏/%s‏/%s" diff --git a/core/res/res/values-be/donottranslate-cldr.xml b/core/res/res/values-be/donottranslate-cldr.xml index a346c8372bfa3..926b4bbecbf5e 100644 --- a/core/res/res/values-be/donottranslate-cldr.xml +++ b/core/res/res/values-be/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k.%M %-l.%M %p %-l.%M %p - h.mm a - H.mm %-e.%-m.%Y d.M.yyyy "%s.%s.%s" diff --git a/core/res/res/values-bg/donottranslate-cldr.xml b/core/res/res/values-bg/donottranslate-cldr.xml index 9c1ae2c095bca..e7ad610b399e3 100644 --- a/core/res/res/values-bg/donottranslate-cldr.xml +++ b/core/res/res/values-bg/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-ca/donottranslate-cldr.xml b/core/res/res/values-ca/donottranslate-cldr.xml index 84e7e79f8dc0d..08721258dc3cc 100644 --- a/core/res/res/values-ca/donottranslate-cldr.xml +++ b/core/res/res/values-ca/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-cs/donottranslate-cldr.xml b/core/res/res/values-cs/donottranslate-cldr.xml index ff7902d58ba51..bbf42f0afb171 100644 --- a/core/res/res/values-cs/donottranslate-cldr.xml +++ b/core/res/res/values-cs/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %-e. %-m. %Y d. M. yyyy "%s. %s. %s" diff --git a/core/res/res/values-da/donottranslate-cldr.xml b/core/res/res/values-da/donottranslate-cldr.xml index d5b98788897d5..427fd0c2680b8 100644 --- a/core/res/res/values-da/donottranslate-cldr.xml +++ b/core/res/res/values-da/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l.%M %p %-l.%M %^p - h.mm a - HH:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-de/donottranslate-cldr.xml b/core/res/res/values-de/donottranslate-cldr.xml index 9bdd8a382fac5..850fe26348a8f 100644 --- a/core/res/res/values-de/donottranslate-cldr.xml +++ b/core/res/res/values-de/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-el/donottranslate-cldr.xml b/core/res/res/values-el/donottranslate-cldr.xml index a0c69b53105fe..dfa199ddab787 100644 --- a/core/res/res/values-el/donottranslate-cldr.xml +++ b/core/res/res/values-el/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-en-rAU/donottranslate-cldr.xml b/core/res/res/values-en-rAU/donottranslate-cldr.xml index 947fe9288664e..7ccff4d725e60 100644 --- a/core/res/res/values-en-rAU/donottranslate-cldr.xml +++ b/core/res/res/values-en-rAU/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %-e/%m/%Y d/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-en-rCA/donottranslate-cldr.xml b/core/res/res/values-en-rCA/donottranslate-cldr.xml index 1845f28fa1008..21e9b7ee8403b 100644 --- a/core/res/res/values-en-rCA/donottranslate-cldr.xml +++ b/core/res/res/values-en-rCA/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %Y-%m-%d yyyy-MM-dd "%s-%s-%s" diff --git a/core/res/res/values-en-rGB/donottranslate-cldr.xml b/core/res/res/values-en-rGB/donottranslate-cldr.xml index a10dfa50ef235..22a8e4171750b 100644 --- a/core/res/res/values-en-rGB/donottranslate-cldr.xml +++ b/core/res/res/values-en-rGB/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-en-rIE/donottranslate-cldr.xml b/core/res/res/values-en-rIE/donottranslate-cldr.xml index 65cab99bc3167..c88d86c01d311 100644 --- a/core/res/res/values-en-rIE/donottranslate-cldr.xml +++ b/core/res/res/values-en-rIE/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-en-rIN/donottranslate-cldr.xml b/core/res/res/values-en-rIN/donottranslate-cldr.xml index 48942fe032dc0..3b7a0ca08e63a 100644 --- a/core/res/res/values-en-rIN/donottranslate-cldr.xml +++ b/core/res/res/values-en-rIN/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-en-rNZ/donottranslate-cldr.xml b/core/res/res/values-en-rNZ/donottranslate-cldr.xml index 117dda873db71..9156376a1941d 100644 --- a/core/res/res/values-en-rNZ/donottranslate-cldr.xml +++ b/core/res/res/values-en-rNZ/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %-e/%m/%Y d/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-en-rUS/donottranslate-cldr.xml b/core/res/res/values-en-rUS/donottranslate-cldr.xml index 0587c165027e4..4d37d47e1d9f7 100644 --- a/core/res/res/values-en-rUS/donottranslate-cldr.xml +++ b/core/res/res/values-en-rUS/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %-m/%-e/%Y M/d/yyyy "%s/%s/%s" diff --git a/core/res/res/values-en-rZA/donottranslate-cldr.xml b/core/res/res/values-en-rZA/donottranslate-cldr.xml index 48ebc6ea721c0..5ae38c14e6616 100644 --- a/core/res/res/values-en-rZA/donottranslate-cldr.xml +++ b/core/res/res/values-en-rZA/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %Y/%m/%d yyyy/MM/dd "%s/%s/%s" diff --git a/core/res/res/values-es-rUS/donottranslate-cldr.xml b/core/res/res/values-es-rUS/donottranslate-cldr.xml index 92247864f5d8c..2339066979f03 100644 --- a/core/res/res/values-es-rUS/donottranslate-cldr.xml +++ b/core/res/res/values-es-rUS/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %-m/%-e/%Y M/d/yyyy "%s/%s/%s" diff --git a/core/res/res/values-es/donottranslate-cldr.xml b/core/res/res/values-es/donottranslate-cldr.xml index 0a680b67da598..dd8a8fa66f698 100644 --- a/core/res/res/values-es/donottranslate-cldr.xml +++ b/core/res/res/values-es/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-et/donottranslate-cldr.xml b/core/res/res/values-et/donottranslate-cldr.xml index bf269ddf99ef4..912df106e47b7 100644 --- a/core/res/res/values-et/donottranslate-cldr.xml +++ b/core/res/res/values-et/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-fa/donottranslate-cldr.xml b/core/res/res/values-fa/donottranslate-cldr.xml index 402311af6eb35..e1c8fec0ad512 100644 --- a/core/res/res/values-fa/donottranslate-cldr.xml +++ b/core/res/res/values-fa/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %Y/%-m/%-e yyyy/M/d "%s/%s/%s" diff --git a/core/res/res/values-fi-rFI/donottranslate-cldr.xml b/core/res/res/values-fi-rFI/donottranslate-cldr.xml index 04f0a77140bf3..32b7803516115 100644 --- a/core/res/res/values-fi-rFI/donottranslate-cldr.xml +++ b/core/res/res/values-fi-rFI/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k.%M %-l.%M %p %-l.%M %^p - h.mm a - H.mm %-e.%-m.%Y d.M.yyyy "%s.%s.%s" diff --git a/core/res/res/values-fi/donottranslate-cldr.xml b/core/res/res/values-fi/donottranslate-cldr.xml index 543595fb646ab..df6f78f8dfe25 100644 --- a/core/res/res/values-fi/donottranslate-cldr.xml +++ b/core/res/res/values-fi/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k.%M %-l.%M %p %-l.%M %^p - h.mm a - H.mm %-e.%-m.%Y d.M.yyyy "%s.%s.%s" diff --git a/core/res/res/values-fr/donottranslate-cldr.xml b/core/res/res/values-fr/donottranslate-cldr.xml index ff10aec13cd35..5698514ff0216 100644 --- a/core/res/res/values-fr/donottranslate-cldr.xml +++ b/core/res/res/values-fr/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-hi-rIN/donottranslate-cldr.xml b/core/res/res/values-hi-rIN/donottranslate-cldr.xml index 5371e155cf1b2..72b89c21835c4 100644 --- a/core/res/res/values-hi-rIN/donottranslate-cldr.xml +++ b/core/res/res/values-hi-rIN/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %-e-%-m-%Y d-M-yyyy "%s-%s-%s" diff --git a/core/res/res/values-hi/donottranslate-cldr.xml b/core/res/res/values-hi/donottranslate-cldr.xml index 8043169f980f3..3e6138eb09a20 100644 --- a/core/res/res/values-hi/donottranslate-cldr.xml +++ b/core/res/res/values-hi/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %-e-%-m-%Y d-M-yyyy "%s-%s-%s" diff --git a/core/res/res/values-hr-rHR/donottranslate-cldr.xml b/core/res/res/values-hr-rHR/donottranslate-cldr.xml index 57e057243021d..d6d20e797505f 100644 --- a/core/res/res/values-hr-rHR/donottranslate-cldr.xml +++ b/core/res/res/values-hr-rHR/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %-e.%-m.%Y. d.M.yyyy. "%s.%s.%s." diff --git a/core/res/res/values-hr/donottranslate-cldr.xml b/core/res/res/values-hr/donottranslate-cldr.xml index 9e4b22523d3de..87039814c0c8f 100644 --- a/core/res/res/values-hr/donottranslate-cldr.xml +++ b/core/res/res/values-hr/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %-e.%-m.%Y. d.M.yyyy. "%s.%s.%s." diff --git a/core/res/res/values-hu-rHU/donottranslate-cldr.xml b/core/res/res/values-hu-rHU/donottranslate-cldr.xml index 5f4b8aaf3cc4c..59eb75a95e8c3 100644 --- a/core/res/res/values-hu-rHU/donottranslate-cldr.xml +++ b/core/res/res/values-hu-rHU/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %p %-l:%M %^p %-l:%M - a h:mm - HH:mm %Y.%m.%d. yyyy.MM.dd. "%s.%s.%s." diff --git a/core/res/res/values-hu/donottranslate-cldr.xml b/core/res/res/values-hu/donottranslate-cldr.xml index c925b827a5341..525b0c0f2f258 100644 --- a/core/res/res/values-hu/donottranslate-cldr.xml +++ b/core/res/res/values-hu/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M %p %-l:%M %^p - h:mm a - HH:mm %Y.%m.%d. yyyy.MM.dd. "%s.%s.%s." diff --git a/core/res/res/values-in-rID/donottranslate-cldr.xml b/core/res/res/values-in-rID/donottranslate-cldr.xml index 8b13bcf0ded56..aedc2c71de07f 100644 --- a/core/res/res/values-in-rID/donottranslate-cldr.xml +++ b/core/res/res/values-in-rID/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-in/donottranslate-cldr.xml b/core/res/res/values-in/donottranslate-cldr.xml index 6e9bba47c58d9..73711328ee758 100644 --- a/core/res/res/values-in/donottranslate-cldr.xml +++ b/core/res/res/values-in/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-it/donottranslate-cldr.xml b/core/res/res/values-it/donottranslate-cldr.xml index 9ff27e825adf8..b06e73d0cd044 100644 --- a/core/res/res/values-it/donottranslate-cldr.xml +++ b/core/res/res/values-it/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M %p %-l:%M %^p - h:mm a - HH:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-iw/donottranslate-cldr.xml b/core/res/res/values-iw/donottranslate-cldr.xml index 631c0591484c5..037251eb3efba 100644 --- a/core/res/res/values-iw/donottranslate-cldr.xml +++ b/core/res/res/values-iw/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-ja/donottranslate-cldr.xml b/core/res/res/values-ja/donottranslate-cldr.xml index 1c1d55fbd1f2e..f2cdbba3678fe 100644 --- a/core/res/res/values-ja/donottranslate-cldr.xml +++ b/core/res/res/values-ja/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M%p %-l:%M%^p - h:mma - H:mm %Y/%m/%d yyyy/MM/dd "%s/%s/%s" diff --git a/core/res/res/values-ko/donottranslate-cldr.xml b/core/res/res/values-ko/donottranslate-cldr.xml index 59b975f08b219..29d798297ea7d 100644 --- a/core/res/res/values-ko/donottranslate-cldr.xml +++ b/core/res/res/values-ko/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %p %-l:%M %p %-l:%M - a h:mm - H:mm %Y. %-m. %-e. yyyy. M. d. "%s. %s. %s." diff --git a/core/res/res/values-lt-rLT/donottranslate-cldr.xml b/core/res/res/values-lt-rLT/donottranslate-cldr.xml index 6cf6098ea43ad..19ae2eaf02bd8 100644 --- a/core/res/res/values-lt-rLT/donottranslate-cldr.xml +++ b/core/res/res/values-lt-rLT/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %Y-%m-%d yyyy-MM-dd "%s-%s-%s" diff --git a/core/res/res/values-lt/donottranslate-cldr.xml b/core/res/res/values-lt/donottranslate-cldr.xml index b1a94f3d81388..0683d4657eaf8 100644 --- a/core/res/res/values-lt/donottranslate-cldr.xml +++ b/core/res/res/values-lt/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %Y-%m-%d yyyy-MM-dd "%s-%s-%s" diff --git a/core/res/res/values-lv-rLV/donottranslate-cldr.xml b/core/res/res/values-lv-rLV/donottranslate-cldr.xml index 3922f6b6bfc67..eb74fa35a184e 100644 --- a/core/res/res/values-lv-rLV/donottranslate-cldr.xml +++ b/core/res/res/values-lv-rLV/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M %p %-l:%M %^p - h:mm a - HH:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-lv/donottranslate-cldr.xml b/core/res/res/values-lv/donottranslate-cldr.xml index ec768bca64080..cd554784cebb4 100644 --- a/core/res/res/values-lv/donottranslate-cldr.xml +++ b/core/res/res/values-lv/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M %p %-l:%M %^p - h:mm a - HH:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-ms/donottranslate-cldr.xml b/core/res/res/values-ms/donottranslate-cldr.xml index a5843ff95fb0c..7c02f3fd31663 100644 --- a/core/res/res/values-ms/donottranslate-cldr.xml +++ b/core/res/res/values-ms/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-nb/donottranslate-cldr.xml b/core/res/res/values-nb/donottranslate-cldr.xml index 8eb1ff64fb6db..d53d4ea68da64 100644 --- a/core/res/res/values-nb/donottranslate-cldr.xml +++ b/core/res/res/values-nb/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H.%M %-l.%M %p %-l.%M %^p - h.mm a - HH.mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-nl/donottranslate-cldr.xml b/core/res/res/values-nl/donottranslate-cldr.xml index 1495a489dcf7d..54e7e390c22cb 100644 --- a/core/res/res/values-nl/donottranslate-cldr.xml +++ b/core/res/res/values-nl/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M %p %-l:%M %^p - h:mm a - HH:mm %d-%m-%Y dd-MM-yyyy "%s-%s-%s" diff --git a/core/res/res/values-pl/donottranslate-cldr.xml b/core/res/res/values-pl/donottranslate-cldr.xml index 53f0c36e4ca4b..91c98eabf96f5 100644 --- a/core/res/res/values-pl/donottranslate-cldr.xml +++ b/core/res/res/values-pl/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-pt-rPT/donottranslate-cldr.xml b/core/res/res/values-pt-rPT/donottranslate-cldr.xml index 26d837147d942..60787a94cdce1 100644 --- a/core/res/res/values-pt-rPT/donottranslate-cldr.xml +++ b/core/res/res/values-pt-rPT/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-kh%M %-l:%M %p %-l:%M %^p - h:mm a - H\'h\'mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-pt/donottranslate-cldr.xml b/core/res/res/values-pt/donottranslate-cldr.xml index c3e6c299d1980..d5fee19546d66 100644 --- a/core/res/res/values-pt/donottranslate-cldr.xml +++ b/core/res/res/values-pt/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-kh%M %-l:%M %p %-l:%M %^p - h:mm a - H\'h\'mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-rm/donottranslate-cldr.xml b/core/res/res/values-rm/donottranslate-cldr.xml index e6f0df271259c..32e117010a79b 100644 --- a/core/res/res/values-rm/donottranslate-cldr.xml +++ b/core/res/res/values-rm/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-ro-rRO/donottranslate-cldr.xml b/core/res/res/values-ro-rRO/donottranslate-cldr.xml index 7056803c670fe..1233f4e12b6e4 100644 --- a/core/res/res/values-ro-rRO/donottranslate-cldr.xml +++ b/core/res/res/values-ro-rRO/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-ro/donottranslate-cldr.xml b/core/res/res/values-ro/donottranslate-cldr.xml index 935c6af4691e0..f80a944f9e494 100644 --- a/core/res/res/values-ro/donottranslate-cldr.xml +++ b/core/res/res/values-ro/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-ru/donottranslate-cldr.xml b/core/res/res/values-ru/donottranslate-cldr.xml index 03c64ab5f6d36..4e315eb2fa17b 100644 --- a/core/res/res/values-ru/donottranslate-cldr.xml +++ b/core/res/res/values-ru/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-sk-rSK/donottranslate-cldr.xml b/core/res/res/values-sk-rSK/donottranslate-cldr.xml index 651c58cadd60b..94dca66beda81 100644 --- a/core/res/res/values-sk-rSK/donottranslate-cldr.xml +++ b/core/res/res/values-sk-rSK/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M %p %-l:%M %p - h:mm a - HH:mm %-e. %-m. %Y d. M. yyyy "%s. %s. %s" diff --git a/core/res/res/values-sk/donottranslate-cldr.xml b/core/res/res/values-sk/donottranslate-cldr.xml index 48c644af3618e..9eeb1331d684c 100644 --- a/core/res/res/values-sk/donottranslate-cldr.xml +++ b/core/res/res/values-sk/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M %p %-l:%M %p - h:mm a - HH:mm %-e.%-m.%Y d.M.yyyy "%s.%s.%s" diff --git a/core/res/res/values-sl-rSI/donottranslate-cldr.xml b/core/res/res/values-sl-rSI/donottranslate-cldr.xml index 84fffbdbfe8da..6cf9bd63b164f 100644 --- a/core/res/res/values-sl-rSI/donottranslate-cldr.xml +++ b/core/res/res/values-sl-rSI/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %-e. %m. %Y d. MM. yyyy "%s. %s. %s" diff --git a/core/res/res/values-sl/donottranslate-cldr.xml b/core/res/res/values-sl/donottranslate-cldr.xml index 137ed3f6fdc4e..49d36fd6053c1 100644 --- a/core/res/res/values-sl/donottranslate-cldr.xml +++ b/core/res/res/values-sl/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %-e. %m. %Y d. MM. yyyy "%s. %s. %s" diff --git a/core/res/res/values-sr-rRS/donottranslate-cldr.xml b/core/res/res/values-sr-rRS/donottranslate-cldr.xml index 996c75ea3f069..3f88960018064 100644 --- a/core/res/res/values-sr-rRS/donottranslate-cldr.xml +++ b/core/res/res/values-sr-rRS/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H.%M %-l:%M %p %-l:%M %p - h:mm a - HH.mm %-e.%-m.%Y. d.M.yyyy. "%s.%s.%s." diff --git a/core/res/res/values-sr/donottranslate-cldr.xml b/core/res/res/values-sr/donottranslate-cldr.xml index 7fca1a2862ffd..ca3cb08ad9a99 100644 --- a/core/res/res/values-sr/donottranslate-cldr.xml +++ b/core/res/res/values-sr/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H.%M %-l:%M %p %-l:%M %p - h:mm a - HH.mm %-e.%-m.%Y. d.M.yyyy. "%s.%s.%s." diff --git a/core/res/res/values-sv/donottranslate-cldr.xml b/core/res/res/values-sv/donottranslate-cldr.xml index 64c83f2c426c9..46b9f9dc41e68 100644 --- a/core/res/res/values-sv/donottranslate-cldr.xml +++ b/core/res/res/values-sv/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d-%m-%Y dd-MM-yyyy "%s-%s-%s" diff --git a/core/res/res/values-sw/donottranslate-cldr.xml b/core/res/res/values-sw/donottranslate-cldr.xml index a7a5150c60242..e0625e9d2cd51 100644 --- a/core/res/res/values-sw/donottranslate-cldr.xml +++ b/core/res/res/values-sw/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %Y/%m/%d yyyy/MM/dd "%s/%s/%s" diff --git a/core/res/res/values-th-rTH/donottranslate-cldr.xml b/core/res/res/values-th-rTH/donottranslate-cldr.xml index 2517143547e74..94ec23d0e2823 100644 --- a/core/res/res/values-th-rTH/donottranslate-cldr.xml +++ b/core/res/res/values-th-rTH/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %-e/%-m/%Y d/M/yyyy "%s/%s/%s" diff --git a/core/res/res/values-th/donottranslate-cldr.xml b/core/res/res/values-th/donottranslate-cldr.xml index 7ab41910db4c2..b42656a4e1f73 100644 --- a/core/res/res/values-th/donottranslate-cldr.xml +++ b/core/res/res/values-th/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %-e/%-m/%Y d/M/yyyy "%s/%s/%s" diff --git a/core/res/res/values-tl/donottranslate-cldr.xml b/core/res/res/values-tl/donottranslate-cldr.xml index 4545fb51ce296..970a538bf2a27 100644 --- a/core/res/res/values-tl/donottranslate-cldr.xml +++ b/core/res/res/values-tl/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %Y-%m-%d yyyy-MM-dd "%s-%s-%s" diff --git a/core/res/res/values-tr/donottranslate-cldr.xml b/core/res/res/values-tr/donottranslate-cldr.xml index 1ab4ff77862a2..a0ee3706c589e 100644 --- a/core/res/res/values-tr/donottranslate-cldr.xml +++ b/core/res/res/values-tr/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M %p %-l:%M %^p - h:mm a - HH:mm %d %m %Y dd MM yyyy "%s %s %s" diff --git a/core/res/res/values-uk-rUA/donottranslate-cldr.xml b/core/res/res/values-uk-rUA/donottranslate-cldr.xml index f7ca4588d55fa..5cb41f40a44ab 100644 --- a/core/res/res/values-uk-rUA/donottranslate-cldr.xml +++ b/core/res/res/values-uk-rUA/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-uk/donottranslate-cldr.xml b/core/res/res/values-uk/donottranslate-cldr.xml index 51c2cb558e60c..f2a61da333018 100644 --- a/core/res/res/values-uk/donottranslate-cldr.xml +++ b/core/res/res/values-uk/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %p - h:mm a - H:mm %d.%m.%Y dd.MM.yyyy "%s.%s.%s" diff --git a/core/res/res/values-vi-rVN/donottranslate-cldr.xml b/core/res/res/values-vi-rVN/donottranslate-cldr.xml index a3850152c26c4..307dab2511186 100644 --- a/core/res/res/values-vi-rVN/donottranslate-cldr.xml +++ b/core/res/res/values-vi-rVN/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-vi/donottranslate-cldr.xml b/core/res/res/values-vi/donottranslate-cldr.xml index 977e0211db613..f4d5dc3d35309 100644 --- a/core/res/res/values-vi/donottranslate-cldr.xml +++ b/core/res/res/values-vi/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %d/%m/%Y dd/MM/yyyy "%s/%s/%s" diff --git a/core/res/res/values-zh-rCN/donottranslate-cldr.xml b/core/res/res/values-zh-rCN/donottranslate-cldr.xml index b34b8b3087a9c..6ac384a85f326 100644 --- a/core/res/res/values-zh-rCN/donottranslate-cldr.xml +++ b/core/res/res/values-zh-rCN/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %p %-l:%M %p %-l:%M - a h:mm - H:mm %Y-%-m-%-e yyyy-M-d "%s-%s-%s" diff --git a/core/res/res/values-zh-rTW/donottranslate-cldr.xml b/core/res/res/values-zh-rTW/donottranslate-cldr.xml index 869705ecb6ab3..42faa83e5f4a5 100644 --- a/core/res/res/values-zh-rTW/donottranslate-cldr.xml +++ b/core/res/res/values-zh-rTW/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %p %-l:%M %p %-l:%M - a h:mm - H:mm %Y/%-m/%-e yyyy/M/d "%s/%s/%s" diff --git a/core/res/res/values-zu/donottranslate-cldr.xml b/core/res/res/values-zu/donottranslate-cldr.xml index 97b179b1c7eda..703823c951173 100644 --- a/core/res/res/values-zu/donottranslate-cldr.xml +++ b/core/res/res/values-zu/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %-k:%M %-l:%M %p %-l:%M %^p - h:mm a - H:mm %Y-%m-%d yyyy-MM-dd "%s-%s-%s" diff --git a/core/res/res/values/donottranslate-cldr.xml b/core/res/res/values/donottranslate-cldr.xml index 0587c165027e4..4d37d47e1d9f7 100644 --- a/core/res/res/values/donottranslate-cldr.xml +++ b/core/res/res/values/donottranslate-cldr.xml @@ -4,8 +4,6 @@ %H:%M %-l:%M%p %-l:%M%^p - h:mm a - HH:mm %-m/%-e/%Y M/d/yyyy "%s/%s/%s" diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index c3abf31438280..1bac5c0d23c98 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -810,8 +810,6 @@ - - diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java index ffc18c7d0e7fd..647615325ce31 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java @@ -42,6 +42,8 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.TimeZone; +import libcore.icu.LocaleData; + import com.android.internal.R; /** @@ -129,20 +131,14 @@ public class Clock extends TextView { private final CharSequence getSmallTime() { Context context = getContext(); - boolean b24 = DateFormat.is24HourFormat(context); - int res; - - if (b24) { - res = R.string.twenty_four_hour_time_format; - } else { - res = R.string.twelve_hour_time_format; - } + boolean is24 = DateFormat.is24HourFormat(context); + LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale); final char MAGIC1 = '\uEF00'; final char MAGIC2 = '\uEF01'; SimpleDateFormat sdf; - String format = context.getString(res); + String format = is24 ? d.timeFormat24 : d.timeFormat12; if (!format.equals(mClockFormatString)) { /* * Search for an unquoted "a" in the format string, so we can