diff options
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/SuggestTestsBase.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/SuggestTestsBase.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java b/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java index 48d169f6a..28766c21f 100644 --- a/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java +++ b/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java @@ -38,11 +38,12 @@ public class SuggestTestsBase extends AndroidTestCase { mTestPackageFile = new File(getTestContext().getApplicationInfo().sourceDir); } - protected static KeyboardId createKeyboardId(Locale locale) { + protected KeyboardId createKeyboardId(Locale locale) { + final int displayWidth = getContext().getResources().getDisplayMetrics().widthPixels; return new KeyboardId(locale.toString() + " keyboard", com.android.inputmethod.latin.R.xml.kbd_qwerty, KeyboardView.COLOR_SCHEME_WHITE, - locale, Configuration.ORIENTATION_LANDSCAPE, KeyboardId.MODE_TEXT, - new EditorInfo(), false, KeyboardId.F2KEY_MODE_NONE, false, false, false, false); + locale, Configuration.ORIENTATION_LANDSCAPE, displayWidth, KeyboardId.MODE_TEXT, + new EditorInfo(), false, false, false, false); } protected InputStream openTestRawResource(int resIdInTest) { |