From bef6a4e20965a8e664ee92b3c75405a6754afb4e Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Sat, 15 Mar 2014 16:25:15 +0900 Subject: [PATCH] Cleanup key definitions a bit Bug: 13017434 Change-Id: I0d0cfa2eb62b5030ff3c67fa40d203255e63258c --- tests/src/com/android/inputmethod/keyboard/layout/Hindi.java | 3 +-- .../com/android/inputmethod/keyboard/layout/LayoutBase.java | 3 ++- .../android/inputmethod/keyboard/layout/NepaliRomanized.java | 2 +- tests/src/com/android/inputmethod/keyboard/layout/Symbols.java | 3 +++ tests/src/com/android/inputmethod/keyboard/layout/Thai.java | 3 +-- .../inputmethod/keyboard/layout/tests/TestsUkrainian.java | 3 +-- .../inputmethod/keyboard/layout/tests/TestsVietnamese.java | 3 +-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java b/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java index 0ba768b85..c1d161615 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java @@ -77,8 +77,7 @@ public final class Hindi extends LayoutBase { // U+20B9: "₹" INDIAN RUPEE SIGN private static final ExpectedKey CURRENCY_HINDI = key("\u20B9", - Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.POUND_SIGN, - Symbols.YEN_SIGN, Symbols.PESO_SIGN); + Symbols.CURRENCY_GENERIC_MORE_KEYS); } @Override diff --git a/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java b/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java index 2c1ac2e4f..982777bd6 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java @@ -265,7 +265,8 @@ public abstract class LayoutBase extends AbstractLayoutBase { key("!", moreKey("\u00A1")), key("?", moreKey("\u00BF"))); // U+200C: ZERO WIDTH NON-JOINER // U+200D: ZERO WIDTH JOINER - static final ExpectedKey ZWNJ_ZWJ_KEY = key(ICON_ZWNJ, "\u200C", moreKey(ICON_ZWJ, "\u200D")); + static final ExpectedKey ZWNJ_KEY = key(ICON_ZWNJ, "\u200C"); + static final ExpectedKey ZWJ_KEY = key(ICON_ZWJ, "\u200D"); // Punctuation more keys for phone form factor. public static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = joinKeys( diff --git a/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java b/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java index 29258945e..c0bc29f2a 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java @@ -45,7 +45,7 @@ public final class NepaliRomanized extends LayoutBase { @Override public ExpectedKey[] getSpaceKeys(final boolean isPhone) { - return joinKeys(SPACE_KEY, ZWNJ_ZWJ_KEY); + return joinKeys(SPACE_KEY, key(ZWNJ_KEY, ZWJ_KEY)); } // U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java b/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java index 127d81aad..9ce418770 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java @@ -74,6 +74,9 @@ public class Symbols extends AbstractLayoutBase { CENT_SIGN, POUND_SIGN, EURO_SIGN, YEN_SIGN, PESO_SIGN); public static final ExpectedKey CURRENCY_EURO = key("\u20AC", CENT_SIGN, POUND_SIGN, DOLLAR_SIGN, YEN_SIGN, PESO_SIGN); + public static final ExpectedKey[] CURRENCY_GENERIC_MORE_KEYS = joinMoreKeys( + Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.POUND_SIGN, + Symbols.YEN_SIGN, Symbols.PESO_SIGN); // Variations of the "double quote" key's "more keys" on the 3rd row. public static final String DOUBLE_QUOTE = "DOUBLE_QUOTE"; diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Thai.java b/tests/src/com/android/inputmethod/keyboard/layout/Thai.java index 747e0aa31..64081a138 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Thai.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Thai.java @@ -61,8 +61,7 @@ public final class Thai extends LayoutBase { // U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT private static final ExpectedKey CURRENCY_BAHT = key("\u0E3F", - Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.POUND_SIGN, - Symbols.YEN_SIGN, Symbols.PESO_SIGN); + Symbols.CURRENCY_GENERIC_MORE_KEYS); } @Override diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java index 20749d675..27893fe9b 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java @@ -58,8 +58,7 @@ public final class TestsUkrainian extends LayoutTestsBase { // U+20B4: "₴" HRYVNIA SIGN private static final ExpectedKey CURRENCY_HRYVNIA = key("\u20B4", - Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.POUND_SIGN, - Symbols.YEN_SIGN, Symbols.PESO_SIGN); + Symbols.CURRENCY_GENERIC_MORE_KEYS); @Override public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java index 94b0c1f3b..96ae38a9c 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java @@ -54,8 +54,7 @@ public final class TestsVietnamese extends LayoutTestsBase { // U+20AB: "₫" DONG SIGN private static final ExpectedKey CURRENCY_DONG = key("\u20AB", - Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.POUND_SIGN, - Symbols.YEN_SIGN, Symbols.PESO_SIGN); + Symbols.CURRENCY_GENERIC_MORE_KEYS); @Override public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {