diff options
author | Yohei Yukawa <yukawa@google.com> | 2014-09-10 14:10:30 +0900 |
---|---|---|
committer | Yohei Yukawa <yukawa@google.com> | 2014-09-10 15:42:14 +0900 |
commit | 443c2bafd824779a75cd4b922b6839a8df9795e9 (patch) | |
tree | d19d285b70d435fa4f9f4631d13f12549f29812e /core/tests | |
parent | f14fb34292a31b278501e325a7f89745a91abf5a (diff) | |
download | frameworks_base-443c2bafd824779a75cd4b922b6839a8df9795e9.zip frameworks_base-443c2bafd824779a75cd4b922b6839a8df9795e9.tar.gz frameworks_base-443c2bafd824779a75cd4b922b6839a8df9795e9.tar.bz2 |
Use public APIs to instantiate InputMethodSubtype
This is a groundwork for subsequent CLs that are
supposed to improve default input method selection
logics.
Historically we have had a @hide constructor of
InputMethodSubtype. However, this contructor is
a bit obsolete because we can not specify some
parameters that were added in recent platform
releases. We should use InputMethodSubtypeBuilder
instead.
BUG: 17347871
Change-Id: I72ad79682a58344e14380eb20e26edf98aee37cd
Diffstat (limited to 'core/tests')
-rw-r--r-- | core/tests/inputmethodtests/src/android/os/InputMethodTest.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/tests/inputmethodtests/src/android/os/InputMethodTest.java b/core/tests/inputmethodtests/src/android/os/InputMethodTest.java index fa1bd8f..5958c3a 100644 --- a/core/tests/inputmethodtests/src/android/os/InputMethodTest.java +++ b/core/tests/inputmethodtests/src/android/os/InputMethodTest.java @@ -26,6 +26,7 @@ import android.test.InstrumentationTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodSubtype; +import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder; import java.util.ArrayList; import java.util.List; @@ -159,8 +160,15 @@ public class InputMethodTest extends InstrumentationTestCase { private static InputMethodSubtype createDummyInputMethodSubtype(String locale, String mode, boolean isAuxiliary, boolean overridesImplicitlyEnabledSubtype) { - return new InputMethodSubtype(0, 0, locale, mode, "", isAuxiliary, - overridesImplicitlyEnabledSubtype); + return new InputMethodSubtypeBuilder() + .setSubtypeNameResId(0) + .setSubtypeIconResId(0) + .setSubtypeLocale(locale) + .setSubtypeMode(mode) + .setSubtypeExtraValue("") + .setIsAuxiliary(isAuxiliary) + .setOverridesImplicitlyEnabledSubtype(overridesImplicitlyEnabledSubtype) + .build(); } private static InputMethodInfo createDefaultAutoDummyVoiceIme() { |