aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputTestsBase.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-20 00:04:01 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-20 00:04:01 -0800
commitd9b075eb24d6b3d8f531d4ab4c4baefb36722ad6 (patch)
treec6c70b8dfcb08fd284c0880ff400037884c15841 /tests/src/com/android/inputmethod/latin/InputTestsBase.java
parentd461405e9e3564591bf5ef8c653cc79021849099 (diff)
parent689cff2e3b1ad3709033b36040dc8607a7cb53d6 (diff)
downloadlatinime-d9b075eb24d6b3d8f531d4ab4c4baefb36722ad6.tar.gz
latinime-d9b075eb24d6b3d8f531d4ab4c4baefb36722ad6.tar.xz
latinime-d9b075eb24d6b3d8f531d4ab4c4baefb36722ad6.zip
am 689cff2e: Merge "[IL21] Move the workaround utils to a better place."
* commit '689cff2e3b1ad3709033b36040dc8607a7cb53d6': [IL21] Move the workaround utils to a better place.
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputTestsBase.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
index aaad740e4..cee73c917 100644
--- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
@@ -162,6 +162,13 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
return setBooleanPreference(PREF_DEBUG_MODE, value, false);
}
+ protected EditorInfo enrichEditorInfo(final EditorInfo ei) {
+ // Some tests that inherit from us need to add some data in the EditorInfo (see
+ // AppWorkaroundsTests#enrichEditorInfo() for a concrete example of this). Since we
+ // control the EditorInfo, we supply a hook here for children to override.
+ return ei;
+ }
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -176,12 +183,13 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
mPreviousAutoCorrectSetting = setStringPreference(PREF_AUTO_CORRECTION_THRESHOLD,
DEFAULT_AUTO_CORRECTION_THRESHOLD, DEFAULT_AUTO_CORRECTION_THRESHOLD);
mLatinIME.onCreate();
- final EditorInfo ei = new EditorInfo();
+ EditorInfo ei = new EditorInfo();
final InputConnection ic = mEditText.onCreateInputConnection(ei);
final LayoutInflater inflater =
(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final ViewGroup vg = new FrameLayout(getContext());
mInputView = inflater.inflate(R.layout.input_view, vg);
+ ei = enrichEditorInfo(ei);
mLatinIME.onCreateInputMethodInterface().startInput(ic, ei);
mLatinIME.setInputView(mInputView);
mLatinIME.onBindInput();