diff options
author | Sam Blitzstein <sblitz@google.com> | 2013-05-07 15:19:32 -0700 |
---|---|---|
committer | Sam Blitzstein <sblitz@google.com> | 2013-05-07 15:30:01 -0700 |
commit | 62e91b1a6e5decfbe7206a381fed5ff9bb08785b (patch) | |
tree | 38ade2e32c895c9d7f12a6065e471349537d6e0a /src/com/android | |
parent | 5f2204bc83982ec4ffec0e01efa39325b4fe58ae (diff) | |
download | android_frameworks_opt_timezonepicker-62e91b1a6e5decfbe7206a381fed5ff9bb08785b.tar.gz android_frameworks_opt_timezonepicker-62e91b1a6e5decfbe7206a381fed5ff9bb08785b.tar.bz2 android_frameworks_opt_timezonepicker-62e91b1a6e5decfbe7206a381fed5ff9bb08785b.zip |
Changing "Palestinian Territories" to "Palestine".
Following Google's updated policy, we will now be changing use of
"Palestinian Territories" to "Palestine" throughout our products.
Change-Id: I3522c5c6ab2bb7f61b94e108a403024f4856d03e
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/timezonepicker/TimeZoneData.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/timezonepicker/TimeZoneData.java b/src/com/android/timezonepicker/TimeZoneData.java index 6ef0e01..1e7b001 100644 --- a/src/com/android/timezonepicker/TimeZoneData.java +++ b/src/com/android/timezonepicker/TimeZoneData.java @@ -42,6 +42,9 @@ public class TimeZoneData { private static final boolean DEBUG = false; private static final int OFFSET_ARRAY_OFFSET = 20; + private static final String PALESTINE_COUNTRY_CODE = "PS"; + + ArrayList<TimeZoneInfo> mTimeZones; LinkedHashMap<String, ArrayList<Integer>> mTimeZonesByCountry; HashSet<String> mTimeZoneNames = new HashSet<String>(); @@ -58,6 +61,7 @@ public class TimeZoneData { private boolean[] mHasTimeZonesInHrOffset = new boolean[40]; SparseArray<ArrayList<Integer>> mTimeZonesByOffsets; private Context mContext; + private String mPalestineDisplayName; public TimeZoneData(Context context, String defaultTimeZoneId, long timeMillis) { mContext = context; @@ -70,6 +74,9 @@ public class TimeZoneData { } else { mTimeMillis = timeMillis; } + + mPalestineDisplayName = context.getResources().getString(R.string.palestine_display_name); + loadTzs(context); Log.i(TAG, "Time to load time zones (ms): " + (System.currentTimeMillis() - now)); @@ -475,7 +482,12 @@ public class TimeZoneData { private String getCountryNames(String lang, String countryCode) { final Locale defaultLocale = Locale.getDefault(); - String countryDisplayName = new Locale(lang, countryCode).getDisplayCountry(defaultLocale); + String countryDisplayName; + if (PALESTINE_COUNTRY_CODE.equalsIgnoreCase(countryCode)) { + countryDisplayName = mPalestineDisplayName; + } else { + countryDisplayName = new Locale(lang, countryCode).getDisplayCountry(defaultLocale); + } if (!countryCode.equals(countryDisplayName)) { return countryDisplayName; |