diff options
author | 2011-08-28 20:34:02 -0700 | |
---|---|---|
committer | 2011-08-28 20:34:02 -0700 | |
commit | 940514989af9611ea8bac483e340799f8990319f (patch) | |
tree | 0276af8798a1284ea07c7b6e41dd50d9d2e2765d /java/src/com/android/inputmethod/latin/DictionaryFactory.java | |
parent | 1f891474931c89bd575df70cbc06df45f8e5cfb8 (diff) | |
parent | ef35cb631c45c8b106fe7ed9e0d1178c3e5fb963 (diff) | |
download | latinime-940514989af9611ea8bac483e340799f8990319f.tar.gz latinime-940514989af9611ea8bac483e340799f8990319f.tar.xz latinime-940514989af9611ea8bac483e340799f8990319f.zip |
Merge "Move locale-related utility methods to LocaleUtils."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/DictionaryFactory.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/DictionaryFactory.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFactory.java b/java/src/com/android/inputmethod/latin/DictionaryFactory.java index 9642151d7..dfaad26bc 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java +++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java @@ -83,9 +83,9 @@ public class DictionaryFactory { try { final Resources res = context.getResources(); if (null != locale) { - final Locale savedLocale = Utils.setSystemLocale(res, locale); + final Locale savedLocale = LocaleUtils.setSystemLocale(res, locale); afd = res.openRawResourceFd(resId); - Utils.setSystemLocale(res, savedLocale); + LocaleUtils.setSystemLocale(res, savedLocale); } else { afd = res.openRawResourceFd(resId); } @@ -145,7 +145,7 @@ public class DictionaryFactory { */ public static boolean isDictionaryAvailable(Context context, Locale locale) { final Resources res = context.getResources(); - final Locale saveLocale = Utils.setSystemLocale(res, locale); + final Locale saveLocale = LocaleUtils.setSystemLocale(res, locale); final int resourceId = Utils.getMainDictionaryResourceId(res); final AssetFileDescriptor afd = res.openRawResourceFd(resourceId); @@ -156,14 +156,14 @@ public class DictionaryFactory { /* Um, what can we do here exactly? */ } - Utils.setSystemLocale(res, saveLocale); + LocaleUtils.setSystemLocale(res, saveLocale); return hasDictionary; } // TODO: Do not use the size of the dictionary as an unique dictionary ID. - public static Long getDictionaryId(Context context, Locale locale) { + public static Long getDictionaryId(final Context context, final Locale locale) { final Resources res = context.getResources(); - final Locale saveLocale = Utils.setSystemLocale(res, locale); + final Locale saveLocale = LocaleUtils.setSystemLocale(res, locale); final int resourceId = Utils.getMainDictionaryResourceId(res); final AssetFileDescriptor afd = res.openRawResourceFd(resourceId); @@ -175,7 +175,7 @@ public class DictionaryFactory { } catch (java.io.IOException e) { } - Utils.setSystemLocale(res, saveLocale); + LocaleUtils.setSystemLocale(res, saveLocale); return size; } |