aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-03-11 18:53:30 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-03-11 19:04:57 +0900
commit8542c48c3009e246ae084a25018ddffcf3c273c3 (patch)
tree4e7b11deafc96a77067f5646613a66e159b245fe /tests/src
parente6b992d9be4d4844279745c032c40bf414b3ae8c (diff)
downloadlatinime-8542c48c3009e246ae084a25018ddffcf3c273c3.tar.gz
latinime-8542c48c3009e246ae084a25018ddffcf3c273c3.tar.xz
latinime-8542c48c3009e246ae084a25018ddffcf3c273c3.zip
Cleanup private method names
This is a follow up of Ib0ded6f98a. Change-Id: I91ad3504d301113680194ad5b10913fc86006150
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java27
1 files changed, 12 insertions, 15 deletions
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java
index 813a51f74..1d242d0b8 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java
@@ -123,8 +123,9 @@ public class LayoutBase {
// Helper method to create alphabet layout for phone by adding special function keys except
// shift key.
- private static ExpectedKeyboardBuilder toPhoneAlphabet(final ExpectedKeyboardBuilder builder) {
- return builder
+ private static ExpectedKeyboardBuilder convertToPhoneAlphabetKeyboardBuilder(
+ final ExpectedKey[][] commonLayout) {
+ return new ExpectedKeyboardBuilder(commonLayout)
.addKeysOnTheRightOfRow(3, DELETE_KEY)
.setLabelsOfRow(4, ",", " ", ".")
.setMoreKeysOf(",", SETTINGS_KEY)
@@ -135,8 +136,9 @@ public class LayoutBase {
// Helper method to create alphabet layout for tablet by adding special function keys except
// shift key.
- private static ExpectedKeyboardBuilder toTabletAlphabet(final ExpectedKeyboardBuilder builder) {
- return builder
+ private static ExpectedKeyboardBuilder convertToTabletAlphabetKeyboardBuilder(
+ final ExpectedKey[][] commonLayout) {
+ return new ExpectedKeyboardBuilder(commonLayout)
// U+00BF: "¿" INVERTED QUESTION MARK
// U+00A1: "¡" INVERTED EXCLAMATION MARK
.addKeysOnTheRightOfRow(3,
@@ -150,22 +152,17 @@ public class LayoutBase {
}
// Helper method to create alphabet layout by adding special function keys.
- public static ExpectedKey[][] getAlphabetLayoutWithoutShiftKeys(final ExpectedKey[][] common,
- final boolean isPhone) {
- final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(common);
- if (isPhone) {
- toPhoneAlphabet(builder);
- } else {
- toTabletAlphabet(builder).build();
- }
- return builder.build();
+ public static ExpectedKey[][] getAlphabetLayoutWithoutShiftKeys(
+ final ExpectedKey[][] commonLayout, final boolean isPhone) {
+ return isPhone ? convertToPhoneAlphabetKeyboardBuilder(commonLayout).build()
+ : convertToTabletAlphabetKeyboardBuilder(commonLayout).build();
}
// Helper method to create alphabet layout by adding special function keys.
- public static ExpectedKey[][] getDefaultAlphabetLayout(final ExpectedKey[][] common,
+ public static ExpectedKey[][] getDefaultAlphabetLayout(final ExpectedKey[][] commonLayout,
final boolean isPhone) {
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(
- getAlphabetLayoutWithoutShiftKeys(common, isPhone));
+ getAlphabetLayoutWithoutShiftKeys(commonLayout, isPhone));
if (isPhone) {
builder.addKeysOnTheLeftOfRow(3, key(SHIFT_KEY, CAPSLOCK_MORE_KEY));
} else {