diff options
author | 2014-08-28 09:42:11 +0000 | |
---|---|---|
committer | 2014-08-28 09:42:11 +0000 | |
commit | 07d1e9906edcd4f1eb47b38ef10d9cabfc5adf29 (patch) | |
tree | 982904d115f6998db64c0f8c9458419e6ccfff14 /tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java | |
parent | f95770354c1a0a662c4b00674f2b9029437be7ea (diff) | |
parent | aadb7a0e03c22865f3af631e437202464aefb3f2 (diff) | |
download | latinime-07d1e9906edcd4f1eb47b38ef10d9cabfc5adf29.tar.gz latinime-07d1e9906edcd4f1eb47b38ef10d9cabfc5adf29.tar.xz latinime-07d1e9906edcd4f1eb47b38ef10d9cabfc5adf29.zip |
am aadb7a0e: am 5f19606d: Add action label tests in other locale than subtype\'s
* commit 'aadb7a0e03c22865f3af631e437202464aefb3f2':
Add action label tests in other locale than subtype's
Diffstat (limited to 'tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java')
-rw-r--r-- | tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java index 0a76a9d91..29aa7580d 100644 --- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java +++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java @@ -43,7 +43,6 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase { private final ArrayList<InputMethodSubtype> mAsciiCapableSubtypesList = new ArrayList<>(); private final ArrayList<InputMethodSubtype> mAdditionalSubtypesList = new ArrayList<>(); - private Context mThemeContext; private int mScreenMetrics; protected abstract int getKeyboardThemeForTests(); @@ -51,12 +50,13 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase { @Override protected void setUp() throws Exception { super.setUp(); - mScreenMetrics = mContext.getResources().getInteger(R.integer.config_screen_metrics); - final KeyboardTheme keyboardTheme = KeyboardTheme.searchKeyboardThemeById( getKeyboardThemeForTests()); - mThemeContext = new ContextThemeWrapper(mContext, keyboardTheme.mStyleId); - RichInputMethodManager.init(mThemeContext); + setContext(new ContextThemeWrapper(getContext(), keyboardTheme.mStyleId)); + + final Context context = getContext(); + mScreenMetrics = context.getResources().getInteger(R.integer.config_screen_metrics); + RichInputMethodManager.init(context); final RichInputMethodManager richImm = RichInputMethodManager.getInstance(); final InputMethodInfo imi = richImm.getInputMethodInfoOfThisIme(); @@ -122,7 +122,7 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase { protected KeyboardLayoutSet createKeyboardLayoutSet(final InputMethodSubtype subtype, final EditorInfo editorInfo, final boolean voiceInputKeyEnabled, final boolean languageSwitchKeyEnabled) { - final Context context = mThemeContext; + final Context context = getContext(); final Resources res = context.getResources(); final int keyboardWidth = ResourceUtils.getDefaultKeyboardWidth(res); final int keyboardHeight = ResourceUtils.getDefaultKeyboardHeight(res); |