diff options
author | 2011-08-26 20:22:47 +0900 | |
---|---|---|
committer | 2011-08-29 12:29:35 +0900 | |
commit | ef35cb631c45c8b106fe7ed9e0d1178c3e5fb963 (patch) | |
tree | 8c19634f9ecd37282ec088e594491bc5962bc926 /java/src/com/android/inputmethod/deprecated | |
parent | 0ada663f3da8fc2d64f82a070b09b27735bc7fab (diff) | |
download | latinime-ef35cb631c45c8b106fe7ed9e0d1178c3e5fb963.tar.gz latinime-ef35cb631c45c8b106fe7ed9e0d1178c3e5fb963.tar.xz latinime-ef35cb631c45c8b106fe7ed9e0d1178c3e5fb963.zip |
Move locale-related utility methods to LocaleUtils.
Change-Id: I7e9e6e5bc4486d8618d0213b112308c3d305c15e
Diffstat (limited to 'java/src/com/android/inputmethod/deprecated')
-rw-r--r-- | java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java | 5 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/deprecated/languageswitcher/LanguageSwitcher.java | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java b/java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java index 7eb5acda8..b6e0ec9cf 100644 --- a/java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java +++ b/java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java @@ -18,6 +18,7 @@ package com.android.inputmethod.deprecated.languageswitcher; import com.android.inputmethod.keyboard.internal.KeyboardBuilder; import com.android.inputmethod.latin.DictionaryFactory; +import com.android.inputmethod.latin.LocaleUtils; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.Settings; import com.android.inputmethod.latin.SharedPreferencesCompat; @@ -155,7 +156,7 @@ public class InputLanguageSelection extends PreferenceActivity { private Pair<Long, Boolean> hasDictionaryOrLayout(Locale locale) { if (locale == null) return new Pair<Long, Boolean>(null, false); final Resources res = getResources(); - final Locale saveLocale = Utils.setSystemLocale(res, locale); + final Locale saveLocale = LocaleUtils.setSystemLocale(res, locale); final Long dictionaryId = DictionaryFactory.getDictionaryId(this, locale); boolean hasLayout = false; @@ -174,7 +175,7 @@ public class InputLanguageSelection extends PreferenceActivity { } catch (XmlPullParserException e) { } catch (IOException e) { } - Utils.setSystemLocale(res, saveLocale); + LocaleUtils.setSystemLocale(res, saveLocale); return new Pair<Long, Boolean>(dictionaryId, hasLayout); } diff --git a/java/src/com/android/inputmethod/deprecated/languageswitcher/LanguageSwitcher.java b/java/src/com/android/inputmethod/deprecated/languageswitcher/LanguageSwitcher.java index 1eedb5ee1..8070942d0 100644 --- a/java/src/com/android/inputmethod/deprecated/languageswitcher/LanguageSwitcher.java +++ b/java/src/com/android/inputmethod/deprecated/languageswitcher/LanguageSwitcher.java @@ -18,9 +18,9 @@ package com.android.inputmethod.deprecated.languageswitcher; import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinImeLogger; +import com.android.inputmethod.latin.LocaleUtils; import com.android.inputmethod.latin.Settings; import com.android.inputmethod.latin.SharedPreferencesCompat; -import com.android.inputmethod.latin.Utils; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; @@ -126,7 +126,7 @@ public class LanguageSwitcher { private void constructLocales() { mLocales.clear(); for (final String lang : mSelectedLanguageArray) { - final Locale locale = Utils.constructLocaleFromString(lang); + final Locale locale = LocaleUtils.constructLocaleFromString(lang); mLocales.add(locale); } } |