diff options
author | 2012-08-21 20:15:43 -0700 | |
---|---|---|
committer | 2012-08-21 20:15:43 -0700 | |
commit | bf661bbab05eb9ecbfa7b3b9a82a7d41e795ed4a (patch) | |
tree | 767107659448fb6da349467476ef083de5b57f23 /java/src/com/android/inputmethod/latin/Utils.java | |
parent | 30904b2b4d45abbda8d19da3cc5f7228bfe2e4b5 (diff) | |
parent | eb59a87a074348d30191e57308221531ae613001 (diff) | |
download | latinime-bf661bbab05eb9ecbfa7b3b9a82a7d41e795ed4a.tar.gz latinime-bf661bbab05eb9ecbfa7b3b9a82a7d41e795ed4a.tar.xz latinime-bf661bbab05eb9ecbfa7b3b9a82a7d41e795ed4a.zip |
am eb59a87a: Merge "Add CollectionUtils class to create generic collection easily" into jb-mr1-dev
* commit 'eb59a87a074348d30191e57308221531ae613001':
Add CollectionUtils class to create generic collection easily
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Utils.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Utils.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/Utils.java b/java/src/com/android/inputmethod/latin/Utils.java index c6b5c338b..9997569a2 100644 --- a/java/src/com/android/inputmethod/latin/Utils.java +++ b/java/src/com/android/inputmethod/latin/Utils.java @@ -477,7 +477,7 @@ public class Utils { private static final String HARDWARE_PREFIX = Build.HARDWARE + ","; private static final HashMap<String, String> sDeviceOverrideValueMap = - new HashMap<String, String>(); + CollectionUtils.newHashMap(); public static String getDeviceOverrideValue(Resources res, int overrideResId, String defValue) { final int orientation = res.getConfiguration().orientation; @@ -495,7 +495,7 @@ public class Utils { return sDeviceOverrideValueMap.get(key); } - private static final HashMap<String, Long> EMPTY_LT_HASH_MAP = new HashMap<String, Long>(); + private static final HashMap<String, Long> EMPTY_LT_HASH_MAP = CollectionUtils.newHashMap(); private static final String LOCALE_AND_TIME_STR_SEPARATER = ","; public static HashMap<String, Long> localeAndTimeStrToHashMap(String str) { if (TextUtils.isEmpty(str)) { @@ -506,7 +506,7 @@ public class Utils { if (N < 2 || N % 2 != 0) { return EMPTY_LT_HASH_MAP; } - final HashMap<String, Long> retval = new HashMap<String, Long>(); + final HashMap<String, Long> retval = CollectionUtils.newHashMap(); for (int i = 0; i < N / 2; ++i) { final String localeStr = ss[i * 2]; final long time = Long.valueOf(ss[i * 2 + 1]); |