aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/SuggestTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/SuggestTestsBase.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java b/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java
index 64f26743e..8aadee42e 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java
@@ -16,15 +16,14 @@
package com.android.inputmethod.latin;
-import com.android.inputmethod.keyboard.KeyboardId;
-import com.android.inputmethod.keyboard.KeyboardView;
-
import android.content.res.AssetFileDescriptor;
import android.content.res.Configuration;
import android.test.AndroidTestCase;
import android.text.TextUtils;
import android.view.inputmethod.EditorInfo;
+import com.android.inputmethod.keyboard.KeyboardId;
+
import java.io.File;
import java.io.InputStream;
import java.util.Locale;
@@ -38,11 +37,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, false, false, false);
+ com.android.inputmethod.latin.R.xml.kbd_qwerty, locale,
+ Configuration.ORIENTATION_LANDSCAPE, displayWidth, KeyboardId.MODE_TEXT,
+ new EditorInfo(), false, KeyboardId.F2KEY_MODE_NONE, false, false, false, false);
}
protected InputStream openTestRawResource(int resIdInTest) {