diff options
author | 2013-01-09 20:55:41 +0900 | |
---|---|---|
committer | 2013-01-10 15:12:17 +0900 | |
commit | 912ad4614f4bd10d871b16b5307fed1405f8c1e2 (patch) | |
tree | 6249103217fdad86eba65075fe7d70ef3be18de0 /java/src | |
parent | 95e3008d2503916a71cee322146d8a0097326000 (diff) | |
download | latinime-912ad4614f4bd10d871b16b5307fed1405f8c1e2.tar.gz latinime-912ad4614f4bd10d871b16b5307fed1405f8c1e2.tar.xz latinime-912ad4614f4bd10d871b16b5307fed1405f8c1e2.zip |
Fix international tests
Tests have been broken again by recent changes to subtype
choice within Latin IME. This fixes the problem and all tests
pass again.
This change also includes a small fix to one test that was
checking for something irrelevant.
Change-Id: I6a03dea24f99b0d2ad84c4161a8413f3060bb811
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SubtypeSwitcher.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index fe2908428..eb0ec3990 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -31,6 +31,7 @@ import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; +import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.keyboard.KeyboardSwitcher; import java.util.List; @@ -239,7 +240,14 @@ public final class SubtypeSwitcher { return mNeedsToDisplayLanguage.getValue(); } + private static Locale sForcedLocaleForTesting = null; + @UsedForTesting + void forceLocale(final Locale locale) { + sForcedLocaleForTesting = locale; + } + public Locale getCurrentSubtypeLocale() { + if (null != sForcedLocaleForTesting) return sForcedLocaleForTesting; return SubtypeLocale.getSubtypeLocale(getCurrentSubtype()); } |