Esempio n. 1
0
 static {
   // Ensure that we pull in the zone strings for the root locale, en_US, and the
   // user's default locale. (All devices must support the root locale and en_US,
   // and they're used for various system things like HTTP headers.) Pre-populating
   // the cache is especially useful on Android because we'll share this via the Zygote.
   cachedZoneStrings.get(Locale.ROOT);
   cachedZoneStrings.get(Locale.US);
   cachedZoneStrings.get(Locale.getDefault());
 }
Esempio n. 2
0
 /** Returns an array of time zone strings, as used by DateFormatSymbols.getZoneStrings. */
 public static String[][] getZoneStrings(Locale locale) {
   if (locale == null) {
     locale = Locale.getDefault();
   }
   return cachedZoneStrings.get(locale);
 }