Refactor more keys spec handling
Change-Id: Ibd95eff0725724ea35ad58e1d1ec7ec3d02a6e90
diff --git a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java
index c0b3445..afd3df4 100644
--- a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java
@@ -41,10 +41,12 @@
super.setUp();
}
- private static MoreKeysKeyboardParams createParams(int numKeys, int fixColumns,
+ private static MoreKeysKeyboardParams createParams(int numKeys, int columnNum,
int coordXInParnet) {
- return new MoreKeysKeyboardParams(numKeys, fixColumns | Key.MORE_KEYS_FIXED_COLUMN_ORDER,
- WIDTH, HEIGHT, coordXInParnet, KEYBOARD_WIDTH);
+ final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
+ params.setParameters(numKeys, columnNum, WIDTH, HEIGHT, coordXInParnet, KEYBOARD_WIDTH,
+ /* isFixedOrderColumn */true);
+ return params;
}
public void testLayoutError() {
diff --git a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderTests.java b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderTests.java
index 90bbf7e..456247b 100644
--- a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderTests.java
@@ -43,8 +43,10 @@
private static MoreKeysKeyboardParams createParams(int numKeys, int maxColumns,
int coordXInParnet) {
- return new MoreKeysKeyboardParams(numKeys, maxColumns, WIDTH, HEIGHT, coordXInParnet,
- KEYBOARD_WIDTH);
+ final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
+ params.setParameters(numKeys, maxColumns, WIDTH, HEIGHT, coordXInParnet, KEYBOARD_WIDTH,
+ /* isFixedOrderColumn */false);
+ return params;
}
public void testLayoutError() {