aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-08-28 09:25:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-28 09:25:26 +0000
commitaadb7a0e03c22865f3af631e437202464aefb3f2 (patch)
tree7559f0770917d6763e2231633ae139a5338297a0 /tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
parent8d0d236394548be4e2302a03960ce4ee363a5483 (diff)
parent5f19606d54266e55bb065880c77a74b1d47a52c8 (diff)
downloadlatinime-aadb7a0e03c22865f3af631e437202464aefb3f2.tar.gz
latinime-aadb7a0e03c22865f3af631e437202464aefb3f2.tar.xz
latinime-aadb7a0e03c22865f3af631e437202464aefb3f2.zip
am 5f19606d: Add action label tests in other locale than subtype\'s
* commit '5f19606d54266e55bb065880c77a74b1d47a52c8': 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.java12
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 4f1a54967..f95ba3cac 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
@@ -42,7 +42,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();
@@ -50,12 +49,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();
@@ -121,7 +121,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);