diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Arabic.java b/tests/src/com/android/inputmethod/keyboard/layout/Arabic.java
index 3f85e4baa..9c2efe246 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Arabic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Arabic.java
@@ -18,6 +18,7 @@ package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.layout.Symbols.RtlSymbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted.RtlSymbolsShifted;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -27,17 +28,15 @@ import java.util.Locale;
public final class Arabic extends LayoutBase {
private static final String LAYOUT_NAME = "arabic";
- public Arabic(final LayoutCustomizer customizer) {
- super(customizer, ArabicSymbols.class, ArabicSymbolsShifted.class);
+ public Arabic(final Locale locale) {
+ super(new ArabicCustomizer(locale), ArabicSymbols.class, ArabicSymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class ArabicCustomizer extends LayoutCustomizer {
- public ArabicCustomizer(final Locale locale) {
- super(locale);
- }
+ private static class ArabicCustomizer extends LayoutCustomizer {
+ ArabicCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return ARABIC_ALPHABET_KEY; }
@@ -141,12 +140,11 @@ public final class Arabic extends LayoutBase {
ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) {
if (isPhone) {
return ALPHABET_COMMON;
- } else {
- final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
- // U+0626: "ئ" ARABIC LETTER YEH WITH HAMZA ABOVE
- builder.insertKeysAtRow(3, 2, "\u0626");
- return builder.build();
}
+ final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
+ // U+0626: "ئ" ARABIC LETTER YEH WITH HAMZA ABOVE
+ builder.insertKeysAtRow(3, 2, "\u0626");
+ return builder.build();
}
@Override
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/ArmenianPhonetic.java b/tests/src/com/android/inputmethod/keyboard/layout/ArmenianPhonetic.java
index 2cecedceb..261618f44 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/ArmenianPhonetic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/ArmenianPhonetic.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -28,15 +29,16 @@ import java.util.Locale;
public final class ArmenianPhonetic extends LayoutBase {
private static final String LAYOUT_NAME = "armenian_phonetic";
- public ArmenianPhonetic(final LayoutCustomizer customizer) {
- super(customizer, ArmenianSymbols.class, ArmenianSymbolsShifted.class);
+ public ArmenianPhonetic(final Locale locale) {
+ super(new ArmenianPhoneticCustomizer(locale), ArmenianSymbols.class,
+ ArmenianSymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class ArmenianPhoneticCustomizer extends LayoutCustomizer {
- public ArmenianPhoneticCustomizer(final Locale locale) { super(locale); }
+ private static class ArmenianPhoneticCustomizer extends LayoutCustomizer {
+ ArmenianPhoneticCustomizer(final Locale locale) { super(locale); }
@Override
public int getNumberOfRows() { return 5; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java b/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java
index a0949637b..f3176d09d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Bengali.java b/tests/src/com/android/inputmethod/keyboard/layout/Bengali.java
index 24852a0dc..339cab444 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Bengali.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Bengali.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/BengaliAkkhor.java b/tests/src/com/android/inputmethod/keyboard/layout/BengaliAkkhor.java
index 4dc16cffe..bb1dc10fb 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/BengaliAkkhor.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/BengaliAkkhor.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java b/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java
index 3282e44ae..bbe038414 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java
@@ -16,7 +16,8 @@
package com.android.inputmethod.keyboard.layout;
-import com.android.inputmethod.keyboard.layout.EastSlavic.EastSlavicCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -25,17 +26,17 @@ import java.util.Locale;
public final class Bulgarian extends LayoutBase {
private static final String LAYOUT_NAME = "bulgarian";
- public Bulgarian(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Bulgarian(final Locale locale) {
+ super(new BulgarianCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class BulgarianCustomizer extends LayoutCustomizer {
+ private static class BulgarianCustomizer extends LayoutCustomizer {
private final EastSlavicCustomizer mEastSlavicCustomizer;
- public BulgarianCustomizer(final Locale locale) {
+ BulgarianCustomizer(final Locale locale) {
super(locale);
mEastSlavicCustomizer = new EastSlavicCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java b/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java
index 20a5f7dac..74372b9bc 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java
@@ -16,7 +16,7 @@
package com.android.inputmethod.keyboard.layout;
-import com.android.inputmethod.keyboard.layout.EastSlavic.EastSlavicCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -25,15 +25,15 @@ import java.util.Locale;
public final class BulgarianBds extends LayoutBase {
private static final String LAYOUT_NAME = "bulgarian_bds";
- public BulgarianBds(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public BulgarianBds(final Locale locale) {
+ super(new BulgarianBdsCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class BulgarianBdsCustomizer extends EastSlavicCustomizer {
- public BulgarianBdsCustomizer(final Locale locale) { super(locale); }
+ private static class BulgarianBdsCustomizer extends EastSlavicCustomizer {
+ BulgarianBdsCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Colemak.java b/tests/src/com/android/inputmethod/keyboard/layout/Colemak.java
index a4a9701cd..3f8ce28eb 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Colemak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Colemak.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java
index 66fce014b..7cb3b92a7 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java
@@ -17,12 +17,10 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import java.util.Locale;
-
/**
* The Dvorak alphabet keyboard.
*/
@@ -36,52 +34,17 @@ public class Dvorak extends LayoutBase {
@Override
public String getName() { return LAYOUT_NAME; }
- public static class DvorakCustomizer extends LayoutCustomizer {
- public DvorakCustomizer(final Locale locale) { super(locale); }
-
- @Override
- public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
- return isPhone ? joinKeys(SHIFT_KEY): joinKeys(SHIFT_KEY, key("q"));
- }
-
- @Override
- public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : joinKeys(key("z"), SHIFT_KEY);
- }
-
- @Override
- public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
- // U+00A1: "¡" INVERTED EXCLAMATION MARK
- return isPhone ? joinKeys(key("q", SETTINGS_KEY))
- : joinKeys(key("!", joinMoreKeys("\u00A1", SETTINGS_KEY)));
- }
-
- @Override
- public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
- final ExpectedAdditionalMoreKey[] punctuationMoreKeys =
- convertToAdditionalMoreKeys(getPunctuationMoreKeys(isPhone));
- // U+00BF: "¿" INVERTED QUESTION MARK
- return isPhone
- ? joinKeys(key("z", punctuationMoreKeys))
- : joinKeys(key("?", joinMoreKeys(punctuationMoreKeys, "\u00BF")));
- }
-
- private static ExpectedAdditionalMoreKey[] convertToAdditionalMoreKeys(
- final ExpectedKey ... moreKeys) {
- final ExpectedAdditionalMoreKey[] additionalMoreKeys =
- new ExpectedAdditionalMoreKey[moreKeys.length];
- for (int index = 0; index < moreKeys.length; index++) {
- additionalMoreKeys[index] = ExpectedAdditionalMoreKey.newInstance(moreKeys[index]);
- }
- return additionalMoreKeys;
- }
- }
-
@Override
public ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) {
return ALPHABET_COMMON;
}
+ /**
+ * Get the left most key of the first row.
+ * @param isPhone true if requesting phone's keys.
+ * @param elementId the element id of the requesting shifted mode.
+ * @return the left most key of the first row.
+ */
protected ExpectedKey getRow1_1Key(final boolean isPhone, final int elementId) {
if (elementId == KeyboardId.ELEMENT_ALPHABET
|| elementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
@@ -90,6 +53,12 @@ public class Dvorak extends LayoutBase {
return key("\"", additionalMoreKey("1"));
}
+ /**
+ * Get the 2nd left key of the first row.
+ * @param isPhone true if requesting phone's keys.
+ * @param elementId the element id of the requesting shifted mode.
+ * @return the 2nd left key of the first row.
+ */
protected ExpectedKey getRow1_2Key(final boolean isPhone, final int elementId) {
if (elementId == KeyboardId.ELEMENT_ALPHABET
|| elementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
@@ -98,6 +67,12 @@ public class Dvorak extends LayoutBase {
return key("<", additionalMoreKey("2"));
}
+ /**
+ * Get the 3rd left key of the first row.
+ * @param isPhone true if requesting phone's keys.
+ * @param elementId the element id of the requesting shifted mode.
+ * @return the 3rd left key of the first row.
+ */
protected ExpectedKey getRow1_3Key(final boolean isPhone, final int elementId) {
if (elementId == KeyboardId.ELEMENT_ALPHABET
|| elementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java b/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java
index 7fcc974c2..f95d2d20e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java
@@ -16,11 +16,9 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import com.android.inputmethod.latin.Constants;
-
-import java.util.Locale;
public final class EastSlavic extends LayoutBase {
private static final String LAYOUT_NAME = "east_slavic";
@@ -32,26 +30,6 @@ public final class EastSlavic extends LayoutBase {
@Override
public String getName() { return LAYOUT_NAME; }
- public static class EastSlavicCustomizer extends LayoutCustomizer {
- public EastSlavicCustomizer(final Locale locale) {
- super(locale);
- }
-
- @Override
- public final ExpectedKey getAlphabetKey() { return EAST_SLAVIC_ALPHABET_KEY; }
-
- @Override
- public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
- }
-
- // U+0410: "А" CYRILLIC CAPITAL LETTER A
- // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
- // U+0412: "В" CYRILLIC CAPITAL LETTER VE
- private static final ExpectedKey EAST_SLAVIC_ALPHABET_KEY = key(
- "\u0410\u0411\u0412", Constants.CODE_SWITCH_ALPHA_SYMBOL);
- }
-
@Override
ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Farsi.java b/tests/src/com/android/inputmethod/keyboard/layout/Farsi.java
index 7390457d0..7c75a3ee9 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Farsi.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Farsi.java
@@ -18,6 +18,7 @@ package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.layout.Symbols.RtlSymbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted.RtlSymbolsShifted;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -27,17 +28,15 @@ import java.util.Locale;
public final class Farsi extends LayoutBase {
private static final String LAYOUT_NAME = "farsi";
- public Farsi(final LayoutCustomizer customizer) {
- super(customizer, FarsiSymbols.class, FarsiSymbolsShifted.class);
+ public Farsi(final Locale locale) {
+ super(new FarsiCustomizer(locale), FarsiSymbols.class, FarsiSymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class FarsiCustomizer extends LayoutCustomizer {
- public FarsiCustomizer(final Locale locale) {
- super(locale);
- }
+ private static class FarsiCustomizer extends LayoutCustomizer {
+ FarsiCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return FARSI_ALPHABET_KEY; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Georgian.java b/tests/src/com/android/inputmethod/keyboard/layout/Georgian.java
index 6f20dfcd1..c26cb9673 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Georgian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Georgian.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -29,15 +30,15 @@ import java.util.Locale;
public final class Georgian extends LayoutBase {
private static final String LAYOUT_NAME = "georgian";
- public Georgian(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Georgian(final Locale locale) {
+ super(new GeorgianCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class GeorgianCustomizer extends LayoutCustomizer {
- public GeorgianCustomizer(final Locale locale) { super(locale); }
+ private static class GeorgianCustomizer extends LayoutCustomizer {
+ GeorgianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return GEORGIAN_ALPHABET_KEY; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Greek.java b/tests/src/com/android/inputmethod/keyboard/layout/Greek.java
index 475052c75..a8eb3d942 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Greek.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Greek.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -29,15 +30,15 @@ import java.util.Locale;
public final class Greek extends LayoutBase {
private static final String LAYOUT_NAME = "greek";
- public Greek(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Greek(final Locale locale) {
+ super(new GreekCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class GreekCustomizer extends EuroCustomizer {
- public GreekCustomizer(final Locale locale) { super(locale); }
+ private static class GreekCustomizer extends EuroCustomizer {
+ GreekCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return GREEK_ALPHABET_KEY; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java b/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java
index 552f0d3d5..69b43588f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java
@@ -18,6 +18,7 @@ package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.layout.Symbols.RtlSymbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted.RtlSymbolsShifted;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -27,17 +28,15 @@ import java.util.Locale;
public final class Hebrew extends LayoutBase {
private static final String LAYOUT_NAME = "hebrew";
- public Hebrew(final LayoutCustomizer customizer) {
- super(customizer, HebrewSymbols.class, RtlSymbolsShifted.class);
+ public Hebrew(final Locale locale) {
+ super(new HebrewCustomizer(locale), HebrewSymbols.class, RtlSymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class HebrewCustomizer extends LayoutCustomizer {
- public HebrewCustomizer(final Locale locale) {
- super(locale);
- }
+ private static class HebrewCustomizer extends LayoutCustomizer {
+ HebrewCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return HEBREW_ALPHABET_KEY; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java b/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java
index a080cac30..82f67aca2 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java
@@ -19,6 +19,7 @@ package com.android.inputmethod.keyboard.layout;
import static com.android.inputmethod.keyboard.layout.DevanagariLetterConstants.*;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/HindiCompact.java b/tests/src/com/android/inputmethod/keyboard/layout/HindiCompact.java
index 457851b0c..a2e339919 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/HindiCompact.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/HindiCompact.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout;
import static com.android.inputmethod.keyboard.layout.DevanagariLetterConstants.*;
import com.android.inputmethod.keyboard.layout.Hindi.HindiSymbols;
+import com.android.inputmethod.keyboard.layout.customizer.HindiCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import com.android.inputmethod.keyboard.layout.tests.HindiCustomizer;
import java.util.Locale;
@@ -31,15 +31,15 @@ import java.util.Locale;
public final class HindiCompact extends LayoutBase {
private static final String LAYOUT_NAME = "hindi_compact";
- public HindiCompact(final LayoutCustomizer customizer) {
- super(customizer, HindiSymbols.class, SymbolsShifted.class);
+ public HindiCompact(final Locale locale) {
+ super(new HindiCompactCustomizer(locale), HindiSymbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class HindiCompactCustomizer extends HindiCustomizer {
- public HindiCompactCustomizer(final Locale locale) { super(locale); }
+ private static class HindiCompactCustomizer extends HindiCustomizer {
+ HindiCompactCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Kannada.java b/tests/src/com/android/inputmethod/keyboard/layout/Kannada.java
index 8bee1f83b..4fff577d3 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Kannada.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Kannada.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -28,15 +29,15 @@ import java.util.Locale;
public final class Kannada extends LayoutBase {
private static final String LAYOUT_NAME = "kannada";
- public Kannada(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Kannada(final Locale locale) {
+ super(new KannadaCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class KannadaCustomizer extends LayoutCustomizer {
- public KannadaCustomizer(final Locale locale) { super(locale); }
+ private static class KannadaCustomizer extends LayoutCustomizer {
+ KannadaCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return KANNADA_ALPHABET_KEY; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Khmer.java b/tests/src/com/android/inputmethod/keyboard/layout/Khmer.java
index 7e4f159ab..20c4d0386 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Khmer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Khmer.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -29,15 +30,15 @@ import java.util.Locale;
public final class Khmer extends LayoutBase {
private static final String LAYOUT_NAME = "khmer";
- public Khmer(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Khmer(final Locale locale) {
+ super(new KhmerCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class KhmerCustomizer extends LayoutCustomizer {
- public KhmerCustomizer(final Locale locale) { super(locale); }
+ private static class KhmerCustomizer extends LayoutCustomizer {
+ KhmerCustomizer(final Locale locale) { super(locale); }
@Override
public int getNumberOfRows() { return 5; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Lao.java b/tests/src/com/android/inputmethod/keyboard/layout/Lao.java
index aaa1c8a8a..091c3a611 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Lao.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Lao.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -29,15 +30,15 @@ import java.util.Locale;
public final class Lao extends LayoutBase {
private static final String LAYOUT_NAME = "lao";
- public Lao(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Lao(final Locale locale) {
+ super(new LaoCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class LaoCustomizer extends LayoutCustomizer {
- public LaoCustomizer(final Locale locale) { super(locale); }
+ private static class LaoCustomizer extends LayoutCustomizer {
+ LaoCustomizer(final Locale locale) { super(locale); }
@Override
public int getNumberOfRows() { return 5; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java b/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java
index b714ec794..285a50ce9 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java
@@ -17,11 +17,10 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
-import com.android.inputmethod.keyboard.internal.KeyboardIconsSet;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import com.android.inputmethod.latin.Constants;
import java.util.Locale;
@@ -29,218 +28,6 @@ import java.util.Locale;
* The base class of keyboard layout.
*/
public abstract class LayoutBase extends AbstractLayoutBase {
- /**
- * This class is used to customize common keyboard layout to language specific layout.
- */
- public static class LayoutCustomizer {
- private final Locale mLocale;
-
- // Empty keys definition to remove keys by adding this.
- protected static final ExpectedKey[] EMPTY_KEYS = joinKeys();
-
- public LayoutCustomizer(final Locale locale) {
- mLocale = locale;
- }
-
- public final Locale getLocale() {
- return mLocale;
- }
-
- public int getNumberOfRows() {
- return 4;
- }
-
- /**
- * Set accented letters to a specific keyboard element.
- * @param builder the {@link ExpectedKeyboardBuilder} object that contains common keyboard
- * layout.
- * @param elementId the element id of keyboard
- * @return the {@link ExpectedKeyboardBuilder} object that contains accented letters as
- * "more keys".
- */
- public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder,
- final int elementId) {
- // This method can be overridden by an extended class to provide customized expected
- // accented letters depending on the shift state of keyboard.
- // This is a default behavior to call a shift-state-independent
- // {@link #setAccentedLetters(ExpectedKeyboardBuilder)} implementation, so that
- // elementId
is ignored here.
- return setAccentedLetters(builder);
- }
-
- /**
- * Set accented letters to common layout.
- * @param builder the {@link ExpectedKeyboardBuilder} object that contains common keyboard
- * layout.
- * @return the {@link ExpectedKeyboardBuilder} object that contains accented letters as
- * "more keys".
- */
- public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
- return builder;
- }
-
- /**
- * Get the function key to switch to alphabet layout.
- * @return the {@link ExpectedKey} of the alphabet key.
- */
- public ExpectedKey getAlphabetKey() { return ALPHABET_KEY; }
-
- /**
- * Get the function key to switch to symbols layout.
- * @return the {@link ExpectedKey} of the symbols key.
- */
- public ExpectedKey getSymbolsKey() { return SYMBOLS_KEY; }
-
- /**
- * Get the function key to switch to symbols shift layout.
- * @param isPhone true if requesting phone's key.
- * @return the {@link ExpectedKey} of the symbols shift key.
- */
- public ExpectedKey getSymbolsShiftKey(boolean isPhone) {
- return isPhone ? SYMBOLS_SHIFT_KEY : TABLET_SYMBOLS_SHIFT_KEY;
- }
-
- /**
- * Get the function key to switch from symbols shift to symbols layout.
- * @return the {@link ExpectedKey} of the back to symbols key.
- */
- public ExpectedKey getBackToSymbolsKey() { return BACK_TO_SYMBOLS_KEY; }
-
- /**
- * Get the currency key.
- * @return the {@link ExpectedKey} of the currency key.
- */
- public ExpectedKey getCurrencyKey() { return Symbols.CURRENCY_DOLLAR; }
-
- /**
- * Get other currencies keys.
- * @return the array of {@link ExpectedKey} that represents other currency keys.
- */
- public ExpectedKey[] getOtherCurrencyKeys() {
- return SymbolsShifted.CURRENCIES_OTHER_THAN_DOLLAR;
- }
-
- /**
- * Get "more keys" of double quotation mark.
- * @return the array of {@link ExpectedKey} of more double quotation marks in natural order.
- */
- public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_9LR; }
-
- /**
- * Get "more keys" of single quotation mark.
- * @return the array of {@link ExpectedKey} of more single quotation marks in natural order.
- */
- public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_9LR; }
-
- /**
- * Get double angle quotation marks in natural order.
- * @return the array of {@link ExpectedKey} of double angle quotation marks in natural
- * order.
- */
- public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_LR; }
-
- /**
- * Get single angle quotation marks in natural order.
- * @return the array of {@link ExpectedKey} of single angle quotation marks in natural
- * order.
- */
- public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_LR; }
-
- /**
- * Get the left shift keys.
- * @param isPhone true if requesting phone's keys.
- * @return the array of {@link ExpectedKey} that should be placed at left edge of the
- * keyboard.
- */
- public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
- return joinKeys(SHIFT_KEY);
- }
-
- /**
- * Get the right shift keys.
- * @param isPhone true if requesting phone's keys.
- * @return the array of {@link ExpectedKey} that should be placed at right edge of the
- * keyboard.
- */
- public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : joinKeys(EXCLAMATION_AND_QUESTION_MARKS, SHIFT_KEY);
- }
-
- /**
- * Get the enter key.
- * @param isPhone true if requesting phone's key.
- * @return the array of {@link ExpectedKey} that should be placed as an enter key.
- */
- public ExpectedKey getEnterKey(final boolean isPhone) {
- return isPhone ? key(ENTER_KEY, EMOJI_ACTION_KEY) : ENTER_KEY;
- }
-
- /**
- * Get the emoji key.
- * @param isPhone true if requesting phone's key.
- * @return the array of {@link ExpectedKey} that should be placed as an emoji key.
- */
- public ExpectedKey getEmojiKey(final boolean isPhone) {
- return EMOJI_NORMAL_KEY;
- }
-
- /**
- * Get the space keys.
- * @param isPhone true if requesting phone's keys.
- * @return the array of {@link ExpectedKey} that should be placed at the center of the
- * keyboard.
- */
- public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
- return joinKeys(LANGUAGE_SWITCH_KEY, SPACE_KEY);
- }
-
- /**
- * Get the keys left to the spacebar.
- * @param isPhone true if requesting phone's keys.
- * @return the array of {@link ExpectedKey} that should be placed at left of the spacebar.
- */
- public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
- // U+002C: "," COMMA
- return joinKeys(key("\u002C", SETTINGS_KEY));
- }
-
- /**
- * Get the keys right to the spacebar.
- * @param isPhone true if requesting phone's keys.
- * @return the array of {@link ExpectedKey} that should be placed at right of the spacebar.
- */
- public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
- final ExpectedKey periodKey = key(".", getPunctuationMoreKeys(isPhone));
- return joinKeys(periodKey);
- }
-
- /**
- * Get "more keys" for the punctuation key (usually the period key).
- * @param isPhone true if requesting phone's keys.
- * @return the array of {@link ExpectedKey} that are "more keys" of the punctuation key.
- */
- public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
- return isPhone ? PHONE_PUNCTUATION_MORE_KEYS : TABLET_PUNCTUATION_MORE_KEYS;
- }
- }
-
- /**
- * The layout customize class for countries that use Euro.
- */
- public static class EuroCustomizer extends LayoutCustomizer {
- public EuroCustomizer(final Locale locale) {
- super(locale);
- }
-
- @Override
- public final ExpectedKey getCurrencyKey() { return Symbols.CURRENCY_EURO; }
-
- @Override
- public final ExpectedKey[] getOtherCurrencyKeys() {
- return SymbolsShifted.CURRENCIES_OTHER_THAN_EURO;
- }
- }
-
private final LayoutCustomizer mCustomizer;
private final Symbols mSymbols;
private final SymbolsShifted mSymbolsShifted;
@@ -276,77 +63,6 @@ public abstract class LayoutBase extends AbstractLayoutBase {
*/
public final LayoutCustomizer getCustomizer() { return mCustomizer; }
- // Icon ids.
- private static final int ICON_DELETE = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_DELETE_KEY);
- private static final int ICON_SPACE = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_SPACE_KEY);
- private static final int ICON_TAB = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_TAB_KEY);
- private static final int ICON_SHORTCUT = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_SHORTCUT_KEY);
- private static final int ICON_SETTINGS = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_SETTINGS_KEY);
- private static final int ICON_LANGUAGE_SWITCH = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_LANGUAGE_SWITCH_KEY);
- private static final int ICON_ENTER = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_ENTER_KEY);
- private static final int ICON_EMOJI_ACTION = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_EMOJI_ACTION_KEY);
- private static final int ICON_EMOJI_NORMAL = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_EMOJI_NORMAL_KEY);
- private static final int ICON_SHIFT = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_SHIFT_KEY);
- private static final int ICON_SHIFTED_SHIFT = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_SHIFT_KEY_SHIFTED);
- private static final int ICON_ZWNJ = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_ZWNJ_KEY);
- private static final int ICON_ZWJ = KeyboardIconsSet.getIconId(
- KeyboardIconsSet.NAME_ZWJ_KEY);
-
- // Functional keys.
- public static final ExpectedKey DELETE_KEY = key(ICON_DELETE, Constants.CODE_DELETE);
- public static final ExpectedKey TAB_KEY = key(ICON_TAB, Constants.CODE_TAB);
- public static final ExpectedKey SHORTCUT_KEY = key(ICON_SHORTCUT, Constants.CODE_SHORTCUT);
- public static final ExpectedKey SETTINGS_KEY = key(ICON_SETTINGS, Constants.CODE_SETTINGS);
- public static final ExpectedKey LANGUAGE_SWITCH_KEY = key(
- ICON_LANGUAGE_SWITCH, Constants.CODE_LANGUAGE_SWITCH);
- public static final ExpectedKey ENTER_KEY = key(ICON_ENTER, Constants.CODE_ENTER);
- public static final ExpectedKey EMOJI_ACTION_KEY = key(ICON_EMOJI_ACTION, Constants.CODE_EMOJI);
- public static final ExpectedKey EMOJI_NORMAL_KEY = key(ICON_EMOJI_NORMAL, Constants.CODE_EMOJI);
- public static final ExpectedKey SPACE_KEY = key(ICON_SPACE, Constants.CODE_SPACE);
- static final ExpectedKey CAPSLOCK_MORE_KEY = key(" ", Constants.CODE_CAPSLOCK);
- public static final ExpectedKey SHIFT_KEY = key(ICON_SHIFT,
- Constants.CODE_SHIFT, CAPSLOCK_MORE_KEY);
- public static final ExpectedKey SHIFTED_SHIFT_KEY = key(ICON_SHIFTED_SHIFT,
- Constants.CODE_SHIFT, CAPSLOCK_MORE_KEY);
- static final ExpectedKey ALPHABET_KEY = key("ABC", Constants.CODE_SWITCH_ALPHA_SYMBOL);
- static final ExpectedKey SYMBOLS_KEY = key("?123", Constants.CODE_SWITCH_ALPHA_SYMBOL);
- static final ExpectedKey BACK_TO_SYMBOLS_KEY = key("?123", Constants.CODE_SHIFT);
- static final ExpectedKey SYMBOLS_SHIFT_KEY = key("= \\ <", Constants.CODE_SHIFT);
- static final ExpectedKey TABLET_SYMBOLS_SHIFT_KEY = key("~ [ <", Constants.CODE_SHIFT);
-
- // U+00A1: "¡" INVERTED EXCLAMATION MARK
- // U+00BF: "¿" INVERTED QUESTION MARK
- public static final ExpectedKey[] EXCLAMATION_AND_QUESTION_MARKS = joinKeys(
- key("!", moreKey("\u00A1")), key("?", moreKey("\u00BF")));
- // U+200C: ZERO WIDTH NON-JOINER
- // U+200D: ZERO WIDTH JOINER
- static final ExpectedKey ZWNJ_KEY = key(ICON_ZWNJ, "\u200C");
- static final ExpectedKey ZWJ_KEY = key(ICON_ZWJ, "\u200D");
- // Domain key
- public static final ExpectedKey DOMAIN_KEY =
- key(".com", joinMoreKeys(".net", ".org", ".gov", ".edu")).preserveCase();
-
- // Punctuation more keys for phone form factor.
- public static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
- ",", "?", "!", "#", ")", "(", "/", ";",
- "'", "@", ":", "-", "\"", "+", "%", "&");
- // Punctuation more keys for tablet form factor.
- public static final ExpectedKey[] TABLET_PUNCTUATION_MORE_KEYS = joinKeys(
- ",", "'", "#", ")", "(", "/", ";",
- "@", ":", "-", "\"", "+", "%", "&");
-
/**
* Helper method to create alphabet layout adding special function keys.
* @param builder the {@link ExpectedKeyboardBuilder} object that contains common keyboard
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Malayalam.java b/tests/src/com/android/inputmethod/keyboard/layout/Malayalam.java
index b44b888e1..55c2e8b98 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Malayalam.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Malayalam.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -28,15 +29,15 @@ import java.util.Locale;
public final class Malayalam extends LayoutBase {
private static final String LAYOUT_NAME = "malayalam";
- public Malayalam(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Malayalam(final Locale locale) {
+ super(new MalayalamCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class MalayalamCustomizer extends LayoutCustomizer {
- public MalayalamCustomizer(final Locale locale) { super(locale); }
+ private static class MalayalamCustomizer extends LayoutCustomizer {
+ MalayalamCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return MALAYALAM_ALPHABET_KEY; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Marathi.java b/tests/src/com/android/inputmethod/keyboard/layout/Marathi.java
index 615ec89bf..af26ec555 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Marathi.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Marathi.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout;
import static com.android.inputmethod.keyboard.layout.DevanagariLetterConstants.*;
import com.android.inputmethod.keyboard.layout.Hindi.HindiSymbols;
+import com.android.inputmethod.keyboard.layout.customizer.DevanagariCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import com.android.inputmethod.keyboard.layout.tests.DevanagariCustomizer;
import java.util.Locale;
@@ -31,20 +31,37 @@ import java.util.Locale;
public final class Marathi extends LayoutBase {
private static final String LAYOUT_NAME = "marathi";
- public Marathi(final LayoutCustomizer customizer) {
- super(customizer, HindiSymbols.class, SymbolsShifted.class);
+ public Marathi(final Locale locale) {
+ super(new MarathiCustomizer(locale), HindiSymbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class MarathiCustomizer extends DevanagariCustomizer {
- public MarathiCustomizer(final Locale locale) { super(locale); }
+ private static class MarathiCustomizer extends DevanagariCustomizer {
+ MarathiCustomizer(final Locale locale) { super(locale); }
+
+ @Override
+ public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
+
+ @Override
+ public ExpectedKey[] getOtherCurrencyKeys() {
+ return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
+ }
@Override
public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
return EMPTY_KEYS;
}
+
+ @Override
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
+ }
+
+ // U+20B9: "₹" INDIAN RUPEE SIGN
+ private static final ExpectedKey CURRENCY_RUPEE = key("\u20B9",
+ Symbols.CURRENCY_GENERIC_MORE_KEYS);
}
@Override
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java b/tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java
index 3c6c05841..288a17e10 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java
@@ -16,7 +16,7 @@
package com.android.inputmethod.keyboard.layout;
-import com.android.inputmethod.keyboard.layout.EastSlavic.EastSlavicCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -25,17 +25,15 @@ import java.util.Locale;
public final class Mongolian extends LayoutBase {
private static final String LAYOUT_NAME = "mongolian";
- public Mongolian(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Mongolian(final Locale locale) {
+ super(new MongolianCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class MongolianMNCustomizer extends EastSlavicCustomizer {
- public MongolianMNCustomizer(final Locale locale) {
- super(locale);
- }
+ private static class MongolianCustomizer extends EastSlavicCustomizer {
+ MongolianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_TUGRIK; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Myanmar.java b/tests/src/com/android/inputmethod/keyboard/layout/Myanmar.java
index 3c70d3266..f7b3590f3 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Myanmar.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Myanmar.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -29,15 +30,15 @@ import java.util.Locale;
public final class Myanmar extends LayoutBase {
private static final String LAYOUT_NAME = "myanmar";
- public Myanmar(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Myanmar(final Locale locale) {
+ super(new MyanmarCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class MyanmarCustomizer extends LayoutCustomizer {
- public MyanmarCustomizer(final Locale locale) { super(locale); }
+ private static class MyanmarCustomizer extends LayoutCustomizer {
+ MyanmarCustomizer(final Locale locale) { super(locale); }
@Override
public int getNumberOfRows() { return 5; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java b/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java
index fec226109..640b63dd6 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java
@@ -20,9 +20,9 @@ import static com.android.inputmethod.keyboard.layout.DevanagariLetterConstants.
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.layout.Hindi.HindiSymbols;
+import com.android.inputmethod.keyboard.layout.customizer.NepaliCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import com.android.inputmethod.keyboard.layout.tests.DevanagariCustomizer;
import java.util.Locale;
@@ -32,28 +32,20 @@ import java.util.Locale;
public final class NepaliRomanized extends LayoutBase {
private static final String LAYOUT_NAME = "nepali_romanized";
- public NepaliRomanized(final LayoutCustomizer customizer) {
- super(customizer, HindiSymbols.class, SymbolsShifted.class);
+ public NepaliRomanized(final Locale locale) {
+ super(new NepaliRomanizedCustomizer(locale), HindiSymbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class NepaliRomanizedCustomizer extends DevanagariCustomizer {
- public NepaliRomanizedCustomizer(final Locale locale) { super(locale); }
+ private static class NepaliRomanizedCustomizer extends NepaliCustomizer {
+ NepaliRomanizedCustomizer(final Locale locale) { super(locale); }
@Override
- public ExpectedKey getCurrencyKey() { return CURRENCY_NEPALI; }
-
- @Override
- public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
- return joinKeys(LANGUAGE_SWITCH_KEY, SPACE_KEY, key(ZWNJ_KEY, ZWJ_KEY));
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
}
-
- // U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN
- private static final ExpectedKey CURRENCY_NEPALI = key("\u0930\u0941\u002E",
- Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.POUND_SIGN,
- Symbols.YEN_SIGN, Symbols.PESO_SIGN);
}
@Override
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java b/tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java
index 4d6cdedbf..17e226f77 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java
@@ -20,7 +20,7 @@ import static com.android.inputmethod.keyboard.layout.DevanagariLetterConstants.
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.layout.Hindi.HindiSymbols;
-import com.android.inputmethod.keyboard.layout.NepaliRomanized.NepaliRomanizedCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.NepaliCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -32,15 +32,15 @@ import java.util.Locale;
public final class NepaliTraditional extends LayoutBase {
private static final String LAYOUT_NAME = "nepali_traditional";
- public NepaliTraditional(final LayoutCustomizer customizer) {
- super(customizer, HindiSymbols.class, SymbolsShifted.class);
+ public NepaliTraditional(final Locale locale) {
+ super(new NepaliTraditionalCustomizer(locale), HindiSymbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class NepaliTraditionalCustomizer extends NepaliRomanizedCustomizer {
- public NepaliTraditionalCustomizer(final Locale locale) { super(locale); }
+ private static class NepaliTraditionalCustomizer extends NepaliCustomizer {
+ NepaliTraditionalCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getRightShiftKeys(final boolean isPhone) { return EMPTY_KEYS; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java b/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java
index c791c404d..4f718e64f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/PcQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/PcQwerty.java
index 3f7340fd0..0085ac6a8 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/PcQwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/PcQwerty.java
@@ -17,11 +17,10 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import java.util.Locale;
-
/**
* The PC QWERTY alphabet keyboard.
*/
@@ -35,35 +34,6 @@ public final class PcQwerty extends LayoutBase {
@Override
public String getName() { return LAYOUT_NAME; }
- public static class PcQwertyCustomizer extends LayoutCustomizer {
- public PcQwertyCustomizer(final Locale locale) { super(locale); }
-
- @Override
- public int getNumberOfRows() { return 5; }
-
- @Override
- public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
- return joinKeys(SHIFT_KEY);
- }
-
- @Override
- public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return joinKeys(SHIFT_KEY);
- }
-
- @Override
- public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
- return joinKeys(SETTINGS_KEY);
- }
-
- @Override
- public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
- return isPhone
- ? joinKeys(key(ENTER_KEY, EMOJI_ACTION_KEY))
- : joinKeys(EMOJI_NORMAL_KEY);
- }
- }
-
@Override
ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) {
final LayoutCustomizer customizer = getCustomizer();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java
index d790a1e53..508df0c17 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java b/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java
index 26ba6cffb..cc41fbf20 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/SerbianQwertz.java b/tests/src/com/android/inputmethod/keyboard/layout/SerbianQwertz.java
index b23fe768e..a4936288a 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/SerbianQwertz.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/SerbianQwertz.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Sinhala.java b/tests/src/com/android/inputmethod/keyboard/layout/Sinhala.java
index 354141d5a..cdd9ea7ae 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Sinhala.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Sinhala.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -29,15 +30,15 @@ import java.util.Locale;
public final class Sinhala extends LayoutBase {
private static final String LAYOUT_NAME = "sinhala";
- public Sinhala(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Sinhala(final Locale locale) {
+ super(new SinhalaCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class SinhalaCustomizer extends LayoutCustomizer {
- public SinhalaCustomizer(final Locale locale) { super(locale); }
+ private static class SinhalaCustomizer extends LayoutCustomizer {
+ SinhalaCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return SINHALA_ALPHABET_KEY; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java b/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java
index be8b435d4..ad8278754 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java
@@ -16,11 +16,9 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import com.android.inputmethod.latin.Constants;
-
-import java.util.Locale;
public final class SouthSlavic extends LayoutBase {
private static final String LAYOUT_NAME = "south_slavic";
@@ -32,26 +30,6 @@ public final class SouthSlavic extends LayoutBase {
@Override
public String getName() { return LAYOUT_NAME; }
- public static class SouthSlavicLayoutCustomizer extends LayoutCustomizer {
- public SouthSlavicLayoutCustomizer(final Locale locale) {
- super(locale);
- }
-
- @Override
- public final ExpectedKey getAlphabetKey() { return SOUTH_SLAVIC_ALPHABET_KEY; }
-
- @Override
- public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
- }
-
- // U+0410: "А" CYRILLIC CAPITAL LETTER A
- // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
- // U+0412: "В" CYRILLIC CAPITAL LETTER VE
- private static final ExpectedKey SOUTH_SLAVIC_ALPHABET_KEY = key(
- "\u0410\u0411\u0412", Constants.CODE_SWITCH_ALPHA_SYMBOL);
- }
-
@Override
ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java b/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java
index 225b9f604..fc6f1ea95 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java b/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java
index 01a602054..57e3725a5 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java b/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java
index 803089721..7ad7b5442 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java
@@ -16,7 +16,7 @@
package com.android.inputmethod.keyboard.layout;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -41,13 +41,13 @@ public class Symbols extends AbstractLayoutBase {
customizer.getSingleQuoteMoreKeys(), customizer.getSingleAngleQuoteKeys())));
if (isPhone) {
builder.addKeysOnTheLeftOfRow(3, customizer.getSymbolsShiftKey(isPhone))
- .addKeysOnTheRightOfRow(3, LayoutBase.DELETE_KEY)
+ .addKeysOnTheRightOfRow(3, DELETE_KEY)
.addKeysOnTheLeftOfRow(4, customizer.getAlphabetKey())
.addKeysOnTheRightOfRow(4, customizer.getEnterKey(isPhone));
} else {
// Tablet symbols keyboard has extra two keys at the left edge of the 3rd row.
builder.addKeysOnTheLeftOfRow(3, (Object[])joinKeys("\\", "="));
- builder.addKeysOnTheRightOfRow(1, LayoutBase.DELETE_KEY)
+ builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
.addKeysOnTheRightOfRow(2, customizer.getEnterKey(isPhone))
.addKeysOnTheLeftOfRow(3, customizer.getSymbolsShiftKey(isPhone))
.addKeysOnTheRightOfRow(3, customizer.getSymbolsShiftKey(isPhone))
@@ -167,7 +167,7 @@ public class Symbols extends AbstractLayoutBase {
// U+00BF: "¿" INVERTED QUESTION MARK
key("?", moreKey("\u00BF")))
.setKeysOfRow(4,
- key(","), key("_"), LayoutBase.SPACE_KEY, key("/"),
+ key(","), key("_"), SPACE_KEY, key("/"),
// U+2026: "…" HORIZONTAL ELLIPSIS
key(".", moreKey("\u2026")))
.build();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java b/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java
index 19cb6075a..64262167d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java
@@ -16,7 +16,7 @@
package com.android.inputmethod.keyboard.layout;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase;
@@ -37,7 +37,7 @@ public class SymbolsShifted extends AbstractLayoutBase {
builder.replaceKeyOfLabel(OTHER_CURRENCIES, (Object[])customizer.getOtherCurrencyKeys());
if (isPhone) {
builder.addKeysOnTheLeftOfRow(3, customizer.getBackToSymbolsKey())
- .addKeysOnTheRightOfRow(3, LayoutBase.DELETE_KEY)
+ .addKeysOnTheRightOfRow(3, DELETE_KEY)
.addKeysOnTheLeftOfRow(4, customizer.getAlphabetKey())
.addKeysOnTheRightOfRow(4, customizer.getEnterKey(isPhone));
} else {
@@ -45,7 +45,7 @@ public class SymbolsShifted extends AbstractLayoutBase {
// U+00BF: "¿" INVERTED QUESTION MARK
// U+00A1: "¡" INVERTED EXCLAMATION MARK
builder.addKeysOnTheRightOfRow(3, (Object[])joinKeys("\u00A1", "\u00BF"));
- builder.addKeysOnTheRightOfRow(1, LayoutBase.DELETE_KEY)
+ builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
.addKeysOnTheRightOfRow(2, customizer.getEnterKey(isPhone))
.addKeysOnTheLeftOfRow(3, customizer.getBackToSymbolsKey())
.addKeysOnTheRightOfRow(3, customizer.getBackToSymbolsKey())
@@ -122,7 +122,7 @@ public class SymbolsShifted extends AbstractLayoutBase {
// U+2264: "≤" LESS-THAN OR EQUAL TO
// U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
key("<", joinMoreKeys("\u2039", "\u2264", "\u00AB")),
- LayoutBase.SPACE_KEY,
+ SPACE_KEY,
// U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
// U+2265: "≥" GREATER-THAN EQUAL TO
// U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Tamil.java b/tests/src/com/android/inputmethod/keyboard/layout/Tamil.java
index 597b6fa55..1413e366a 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Tamil.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Tamil.java
@@ -16,11 +16,9 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import com.android.inputmethod.latin.Constants;
-
-import java.util.Locale;
/**
* The Tamil keyboard.
@@ -35,29 +33,6 @@ public final class Tamil extends LayoutBase {
@Override
public String getName() { return LAYOUT_NAME; }
- public static class TamilCustomizer extends LayoutCustomizer {
- public TamilCustomizer(final Locale locale) { super(locale); }
-
- @Override
- public ExpectedKey getAlphabetKey() { return TAMIL_ALPHABET_KEY; }
-
- @Override
- public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
- return EMPTY_KEYS;
- }
-
- @Override
- public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
- }
-
- // U+0BA4: "த" TAMIL LETTER TA
- // U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I
- // U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA
- private static final ExpectedKey TAMIL_ALPHABET_KEY = key(
- "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", Constants.CODE_SWITCH_ALPHA_SYMBOL);
- }
-
@Override
ExpectedKey[][] getCommonAlphabetLayout(boolean isPhone) { return ALPHABET_COMMON; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Telugu.java b/tests/src/com/android/inputmethod/keyboard/layout/Telugu.java
index cc8224c54..84c5df622 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Telugu.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Telugu.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -28,15 +29,15 @@ import java.util.Locale;
public final class Telugu extends LayoutBase {
private static final String LAYOUT_NAME = "telugu";
- public Telugu(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Telugu(final Locale locale) {
+ super(new TeluguCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class TeluguCustomizer extends LayoutCustomizer {
- public TeluguCustomizer(final Locale locale) { super(locale); }
+ private static class TeluguCustomizer extends LayoutCustomizer {
+ TeluguCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return TELUGU_ALPHABET_KEY; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Thai.java b/tests/src/com/android/inputmethod/keyboard/layout/Thai.java
index cfda2947c..1463336c4 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Thai.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Thai.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
@@ -29,15 +30,15 @@ import java.util.Locale;
public final class Thai extends LayoutBase {
private static final String LAYOUT_NAME = "thai";
- public Thai(final LayoutCustomizer customizer) {
- super(customizer, Symbols.class, SymbolsShifted.class);
+ public Thai(final Locale locale) {
+ super(new ThaiCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
- public static class ThaiCustomizer extends LayoutCustomizer {
- public ThaiCustomizer(final Locale locale) { super(locale); }
+ private static class ThaiCustomizer extends LayoutCustomizer {
+ ThaiCustomizer(final Locale locale) { super(locale); }
@Override
public int getNumberOfRows() { return 5; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Uzbek.java b/tests/src/com/android/inputmethod/keyboard/layout/Uzbek.java
index df391a54a..f37fd2241 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Uzbek.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Uzbek.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard.layout;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/BengaliCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/BengaliCustomizer.java
similarity index 80%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/BengaliCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/BengaliCustomizer.java
index 7964b64ee..d255516b6 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/BengaliCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/BengaliCustomizer.java
@@ -14,10 +14,8 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.SymbolsShifted;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.latin.Constants;
@@ -37,12 +35,12 @@ public class BengaliCustomizer extends LayoutCustomizer {
@Override
public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : LayoutBase.EXCLAMATION_AND_QUESTION_MARKS;
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
}
// U+0995: "क" BENGALI LETTER KA
// U+0996: "ख" BENGALI LETTER KHA
// U+0997: "ग" BENGALI LETTER GA
- private static final ExpectedKey BENGALI_ALPHABET_KEY = LayoutBase.key(
+ private static final ExpectedKey BENGALI_ALPHABET_KEY = key(
"\u0995\u0996\u0997", Constants.CODE_SWITCH_ALPHA_SYMBOL);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/DanishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/DanishCustomizer.java
similarity index 96%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/DanishCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/DanishCustomizer.java
index 2c5df6045..3d91194f2 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/DanishCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/DanishCustomizer.java
@@ -14,17 +14,16 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
import com.android.inputmethod.keyboard.layout.Nordic;
import com.android.inputmethod.keyboard.layout.Symbols;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class DanishCustomizer extends EuroCustomizer {
+public class DanishCustomizer extends EuroCustomizer {
public DanishCustomizer(final Locale locale) { super(locale); }
@Override
@@ -110,4 +109,4 @@ class DanishCustomizer extends EuroCustomizer {
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
.setMoreKeysOf("n", "\u00F1", "\u0144");
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/DevanagariCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/DevanagariCustomizer.java
similarity index 62%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/DevanagariCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/DevanagariCustomizer.java
index a31591d32..d4e5e5885 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/DevanagariCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/DevanagariCustomizer.java
@@ -14,12 +14,8 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.Hindi;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
-import com.android.inputmethod.keyboard.layout.Symbols;
-import com.android.inputmethod.keyboard.layout.SymbolsShifted;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.latin.Constants;
@@ -37,34 +33,17 @@ public class DevanagariCustomizer extends LayoutCustomizer {
@Override
public ExpectedKey getBackToSymbolsKey() { return HINDI_BACK_TO_SYMBOLS_KEY; }
- @Override
- public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
-
- @Override
- public ExpectedKey[] getOtherCurrencyKeys() {
- return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
- }
-
- @Override
- public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : Hindi.EXCLAMATION_AND_QUESTION_MARKS;
- }
-
// U+0915: "क" DEVANAGARI LETTER KA
// U+0916: "ख" DEVANAGARI LETTER KHA
// U+0917: "ग" DEVANAGARI LETTER GA
- private static final ExpectedKey HINDI_ALPHABET_KEY = Hindi.key(
+ private static final ExpectedKey HINDI_ALPHABET_KEY = key(
"\u0915\u0916\u0917", Constants.CODE_SWITCH_ALPHA_SYMBOL);
// U+0967: "१" DEVANAGARI DIGIT ONE
// U+0968: "२" DEVANAGARI DIGIT TWO
// U+0969: "३" DEVANAGARI DIGIT THREE
private static final String HINDI_SYMBOLS_LABEL = "?\u0967\u0968\u0969";
- private static final ExpectedKey HINDI_SYMBOLS_KEY = Hindi.key(HINDI_SYMBOLS_LABEL,
+ private static final ExpectedKey HINDI_SYMBOLS_KEY = key(HINDI_SYMBOLS_LABEL,
Constants.CODE_SWITCH_ALPHA_SYMBOL);
- private static final ExpectedKey HINDI_BACK_TO_SYMBOLS_KEY = Hindi.key(HINDI_SYMBOLS_LABEL,
+ private static final ExpectedKey HINDI_BACK_TO_SYMBOLS_KEY = key(HINDI_SYMBOLS_LABEL,
Constants.CODE_SHIFT);
-
- // U+20B9: "₹" INDIAN RUPEE SIGN
- private static final ExpectedKey CURRENCY_RUPEE = Hindi.key("\u20B9",
- Symbols.CURRENCY_GENERIC_MORE_KEYS);
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/DutchCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/DutchCustomizer.java
new file mode 100644
index 000000000..825afb64b
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/DutchCustomizer.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+public class DutchCustomizer extends EuroCustomizer {
+ public DutchCustomizer(final Locale locale) { super(locale); }
+
+ @Override
+ public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
+
+ @Override
+ public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_L9R; }
+
+ @Override
+ public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
+ return builder
+ // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
+ // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+ // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
+ // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+ // U+00E6: "æ" LATIN SMALL LETTER AE
+ // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
+ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
+ // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
+ .setMoreKeysOf("a",
+ "\u00E1", "\u00E4", "\u00E2", "\u00E0", "\u00E6", "\u00E3", "\u00E5",
+ "\u0101")
+ // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+ // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
+ // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
+ // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
+ // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
+ // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
+ // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
+ .setMoreKeysOf("e",
+ "\u00E9", "\u00EB", "\u00EA", "\u00E8", "\u0119", "\u0117", "\u0113")
+ // U+0133: "ij" LATIN SMALL LIGATURE IJ
+ .setMoreKeysOf("y", "\u0133")
+ // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
+ // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+ // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
+ // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
+ // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
+ .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
+ // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
+ // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
+ // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
+ // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
+ // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
+ // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
+ // U+0133: "ij" LATIN SMALL LIGATURE IJ
+ .setMoreKeysOf("i",
+ "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B", "\u0133")
+ // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+ // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+ // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+ // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+ // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
+ // U+0153: "œ" LATIN SMALL LIGATURE OE
+ // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+ // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
+ .setMoreKeysOf("o",
+ "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8",
+ "\u014D")
+ // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
+ // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
+ .setMoreKeysOf("n", "\u00F1", "\u0144");
+ }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/DvorakCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/DvorakCustomizer.java
new file mode 100644
index 000000000..b7b018793
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/DvorakCustomizer.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey;
+
+import java.util.Locale;
+
+public class DvorakCustomizer extends LayoutCustomizer {
+ public DvorakCustomizer(final Locale locale) { super(locale); }
+
+ @Override
+ public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
+ return isPhone ? joinKeys(SHIFT_KEY): joinKeys(SHIFT_KEY, key("q"));
+ }
+
+ @Override
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return isPhone ? EMPTY_KEYS : joinKeys(key("z"), SHIFT_KEY);
+ }
+
+ @Override
+ public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
+ // U+00A1: "¡" INVERTED EXCLAMATION MARK
+ return isPhone ? joinKeys(key("q", SETTINGS_KEY))
+ : joinKeys(key("!", joinMoreKeys("\u00A1", SETTINGS_KEY)));
+ }
+
+ @Override
+ public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
+ final ExpectedAdditionalMoreKey[] punctuationMoreKeys =
+ convertToAdditionalMoreKeys(getPunctuationMoreKeys(isPhone));
+ // U+00BF: "¿" INVERTED QUESTION MARK
+ return isPhone
+ ? joinKeys(key("z", punctuationMoreKeys))
+ : joinKeys(key("?", joinMoreKeys(punctuationMoreKeys, "\u00BF")));
+ }
+
+ private static ExpectedAdditionalMoreKey[] convertToAdditionalMoreKeys(
+ final ExpectedKey ... moreKeys) {
+ final ExpectedAdditionalMoreKey[] additionalMoreKeys =
+ new ExpectedAdditionalMoreKey[moreKeys.length];
+ for (int index = 0; index < moreKeys.length; index++) {
+ additionalMoreKeys[index] = ExpectedAdditionalMoreKey.newInstance(moreKeys[index]);
+ }
+ return additionalMoreKeys;
+ }
+
+ public static class EnglishDvorakCustomizer extends DvorakCustomizer {
+ private final EnglishCustomizer mEnglishCustomizer;
+
+ public EnglishDvorakCustomizer(final Locale locale) {
+ super(locale);
+ mEnglishCustomizer = new EnglishCustomizer(locale);
+ }
+
+ @Override
+ public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
+ return mEnglishCustomizer.setAccentedLetters(builder);
+ }
+ }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/EastSlavicCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/EastSlavicCustomizer.java
new file mode 100644
index 000000000..03fc973f0
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/EastSlavicCustomizer.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.latin.Constants;
+
+import java.util.Locale;
+
+public class EastSlavicCustomizer extends LayoutCustomizer {
+ public EastSlavicCustomizer(final Locale locale) { super(locale); }
+
+ @Override
+ public final ExpectedKey getAlphabetKey() { return EAST_SLAVIC_ALPHABET_KEY; }
+
+ @Override
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
+ }
+
+ // U+0410: "А" CYRILLIC CAPITAL LETTER A
+ // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
+ // U+0412: "В" CYRILLIC CAPITAL LETTER VE
+ private static final ExpectedKey EAST_SLAVIC_ALPHABET_KEY = key(
+ "\u0410\u0411\u0412", Constants.CODE_SWITCH_ALPHA_SYMBOL);
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/EnglishCustomizer.java
similarity index 93%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/EnglishCustomizer.java
index 3e82f65bf..9a9c6bb2f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/EnglishCustomizer.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class EnglishCustomizer extends LayoutCustomizer {
- EnglishCustomizer(final Locale locale) { super(locale); }
+public class EnglishCustomizer extends LayoutCustomizer {
+ public EnglishCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/EstonianEECustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/EstonianEECustomizer.java
similarity index 96%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/EstonianEECustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/EstonianEECustomizer.java
index d0b87726f..a7d611a3e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/EstonianEECustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/EstonianEECustomizer.java
@@ -14,10 +14,9 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
import com.android.inputmethod.keyboard.KeyboardId;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Nordic;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
@@ -25,10 +24,8 @@ import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class EstonianEECustomizer extends EuroCustomizer {
- public EstonianEECustomizer(final Locale locale) {
- super(locale);
- }
+public class EstonianEECustomizer extends EuroCustomizer {
+ public EstonianEECustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
@@ -167,4 +164,4 @@ class EstonianEECustomizer extends EuroCustomizer {
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
.setMoreKeysOf("n", "\u0146", "\u00F1", "\u0144");
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/EuroCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/EuroCustomizer.java
new file mode 100644
index 000000000..ee0236d88
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/EuroCustomizer.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.SymbolsShifted;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+
+import java.util.Locale;
+
+/**
+ * The layout customize class for countries that use Euro.
+ */
+public class EuroCustomizer extends LayoutCustomizer {
+ public EuroCustomizer(final Locale locale) {
+ super(locale);
+ }
+
+ @Override
+ public final ExpectedKey getCurrencyKey() { return Symbols.CURRENCY_EURO; }
+
+ @Override
+ public final ExpectedKey[] getOtherCurrencyKeys() {
+ return SymbolsShifted.CURRENCIES_OTHER_THAN_EURO;
+ }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/FinnishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/FinnishCustomizer.java
similarity index 95%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/FinnishCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/FinnishCustomizer.java
index 912aec4a0..a792f9143 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/FinnishCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/FinnishCustomizer.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
import com.android.inputmethod.keyboard.layout.Nordic;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class FinnishCustomizer extends EuroCustomizer {
+public class FinnishCustomizer extends EuroCustomizer {
public FinnishCustomizer(final Locale locale) { super(locale); }
protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
@@ -80,4 +79,4 @@ class FinnishCustomizer extends EuroCustomizer {
// U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
.setMoreKeysOf("z", "\u017E", "\u017A", "\u017C");
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/FrenchCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/FrenchCustomizer.java
similarity index 84%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/FrenchCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/FrenchCustomizer.java
index ab90267d0..d7798cc56 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/FrenchCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/FrenchCustomizer.java
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class FrenchCustomizer extends LayoutCustomizer {
- FrenchCustomizer(final Locale locale) { super(locale); }
+public class FrenchCustomizer extends LayoutCustomizer {
+ public FrenchCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
@@ -86,4 +86,21 @@ class FrenchCustomizer extends LayoutCustomizer {
.setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D")
.setAdditionalMoreKeysPositionOf("c", 2);
}
+
+ public static final class FrenchEuroCustomizer extends FrenchCustomizer {
+ private final EuroCustomizer mEuroCustomizer;
+
+ public FrenchEuroCustomizer(final Locale locale) {
+ super(locale);
+ mEuroCustomizer = new EuroCustomizer(locale);
+ }
+
+ @Override
+ public final ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); }
+
+ @Override
+ public final ExpectedKey[] getOtherCurrencyKeys() {
+ return mEuroCustomizer.getOtherCurrencyKeys();
+ }
+ }
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/GermanCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/GermanCustomizer.java
similarity index 86%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/GermanCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/GermanCustomizer.java
index 6d38937aa..e0e4c78b1 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/GermanCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/GermanCustomizer.java
@@ -14,16 +14,15 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
import com.android.inputmethod.keyboard.layout.Symbols;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class GermanCustomizer extends LayoutCustomizer {
+public class GermanCustomizer extends LayoutCustomizer {
public GermanCustomizer(final Locale locale) { super(locale); }
@Override
@@ -86,4 +85,21 @@ class GermanCustomizer extends LayoutCustomizer {
// U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
.setMoreKeysOf("n", "\u00F1", "\u0144");
}
+
+ public static class GermanEuroCustomizer extends GermanCustomizer {
+ private final EuroCustomizer mEuroCustomizer;
+
+ public GermanEuroCustomizer(final Locale locale) {
+ super(locale);
+ mEuroCustomizer = new EuroCustomizer(locale);
+ }
+
+ @Override
+ public ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); }
+
+ @Override
+ public ExpectedKey[] getOtherCurrencyKeys() {
+ return mEuroCustomizer.getOtherCurrencyKeys();
+ }
+ }
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/HindiCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/HindiCustomizer.java
similarity index 65%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/HindiCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/HindiCustomizer.java
index cb53bdc24..c7fe9dbd5 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/HindiCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/HindiCustomizer.java
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.SymbolsShifted;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -24,11 +25,24 @@ import java.util.Locale;
public class HindiCustomizer extends DevanagariCustomizer {
public HindiCustomizer(final Locale locale) { super(locale); }
+ @Override
+ public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
+
+ @Override
+ public ExpectedKey[] getOtherCurrencyKeys() {
+ return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
+ }
+
+ @Override
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
+ }
+
@Override
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
// U+0964: "।" DEVANAGARI DANDA
- final ExpectedKey periodKey = LayoutBase.key("\u0964", getPunctuationMoreKeys(isPhone));
- return LayoutBase.joinKeys(periodKey);
+ final ExpectedKey periodKey = key("\u0964", getPunctuationMoreKeys(isPhone));
+ return joinKeys(periodKey);
}
@Override
@@ -36,12 +50,16 @@ public class HindiCustomizer extends DevanagariCustomizer {
return isPhone ? HINDI_PHONE_PUNCTUATION_MORE_KEYS : HINDI_TABLET_PUNCTUATION_MORE_KEYS;
}
+ // U+20B9: "₹" INDIAN RUPEE SIGN
+ private static final ExpectedKey CURRENCY_RUPEE = key("\u20B9",
+ Symbols.CURRENCY_GENERIC_MORE_KEYS);
+
// Punctuation more keys for phone form factor.
- private static final ExpectedKey[] HINDI_PHONE_PUNCTUATION_MORE_KEYS = LayoutBase.joinKeys(
+ private static final ExpectedKey[] HINDI_PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
",", ".", "?", "!", "#", ")", "(", "/", ";",
"'", "@", ":", "-", "\"", "+", "%", "&");
// Punctuation more keys for tablet form factor.
- private static final ExpectedKey[] HINDI_TABLET_PUNCTUATION_MORE_KEYS = LayoutBase.joinKeys(
+ private static final ExpectedKey[] HINDI_TABLET_PUNCTUATION_MORE_KEYS = joinKeys(
",", ".", "'", "#", ")", "(", "/", ";",
"@", ":", "-", "\"", "+", "%", "&");
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/ItalianCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/ItalianCustomizer.java
similarity index 95%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/ItalianCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/ItalianCustomizer.java
index 735070946..3b547fdc4 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/ItalianCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/ItalianCustomizer.java
@@ -14,14 +14,13 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class ItalianCustomizer extends LayoutCustomizer {
+public class ItalianCustomizer extends LayoutCustomizer {
public ItalianCustomizer(final Locale locale) { super(locale); }
@Override
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/LayoutCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/LayoutCustomizer.java
new file mode 100644
index 000000000..27f55342e
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/LayoutCustomizer.java
@@ -0,0 +1,214 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.SymbolsShifted;
+import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+/**
+ * This class is used to customize common keyboard layout to language specific layout.
+ */
+public class LayoutCustomizer extends AbstractLayoutBase {
+ private final Locale mLocale;
+
+ // Empty keys definition to remove keys by adding this.
+ protected static final ExpectedKey[] EMPTY_KEYS = joinKeys();
+
+ public LayoutCustomizer(final Locale locale) { mLocale = locale; }
+
+ public final Locale getLocale() { return mLocale; }
+
+ public int getNumberOfRows() { return 4; }
+
+ /**
+ * Set accented letters to a specific keyboard element.
+ * @param builder the {@link ExpectedKeyboardBuilder} object that contains common keyboard
+ * layout.
+ * @param elementId the element id of keyboard
+ * @return the {@link ExpectedKeyboardBuilder} object that contains accented letters as
+ * "more keys".
+ */
+ public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder,
+ final int elementId) {
+ // This method can be overridden by an extended class to provide customized expected
+ // accented letters depending on the shift state of keyboard.
+ // This is a default behavior to call a shift-state-independent
+ // {@link #setAccentedLetters(ExpectedKeyboardBuilder)} implementation, so that
+ // elementId
is ignored here.
+ return setAccentedLetters(builder);
+ }
+
+ /**
+ * Set accented letters to common layout.
+ * @param builder the {@link ExpectedKeyboardBuilder} object that contains common keyboard
+ * layout.
+ * @return the {@link ExpectedKeyboardBuilder} object that contains accented letters as
+ * "more keys".
+ */
+ public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
+ return builder;
+ }
+
+ /**
+ * Get the function key to switch to alphabet layout.
+ * @return the {@link ExpectedKey} of the alphabet key.
+ */
+ public ExpectedKey getAlphabetKey() { return ALPHABET_KEY; }
+
+ /**
+ * Get the function key to switch to symbols layout.
+ * @return the {@link ExpectedKey} of the symbols key.
+ */
+ public ExpectedKey getSymbolsKey() { return SYMBOLS_KEY; }
+
+ /**
+ * Get the function key to switch to symbols shift layout.
+ * @param isPhone true if requesting phone's key.
+ * @return the {@link ExpectedKey} of the symbols shift key.
+ */
+ public ExpectedKey getSymbolsShiftKey(boolean isPhone) {
+ return isPhone ? SYMBOLS_SHIFT_KEY : TABLET_SYMBOLS_SHIFT_KEY;
+ }
+
+ /**
+ * Get the function key to switch from symbols shift to symbols layout.
+ * @return the {@link ExpectedKey} of the back to symbols key.
+ */
+ public ExpectedKey getBackToSymbolsKey() { return BACK_TO_SYMBOLS_KEY; }
+
+ /**
+ * Get the currency key.
+ * @return the {@link ExpectedKey} of the currency key.
+ */
+ public ExpectedKey getCurrencyKey() { return Symbols.CURRENCY_DOLLAR; }
+
+ /**
+ * Get other currencies keys.
+ * @return the array of {@link ExpectedKey} that represents other currency keys.
+ */
+ public ExpectedKey[] getOtherCurrencyKeys() {
+ return SymbolsShifted.CURRENCIES_OTHER_THAN_DOLLAR;
+ }
+
+ /**
+ * Get "more keys" of double quotation mark.
+ * @return the array of {@link ExpectedKey} of more double quotation marks in natural order.
+ */
+ public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_9LR; }
+
+ /**
+ * Get "more keys" of single quotation mark.
+ * @return the array of {@link ExpectedKey} of more single quotation marks in natural order.
+ */
+ public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_9LR; }
+
+ /**
+ * Get double angle quotation marks in natural order.
+ * @return the array of {@link ExpectedKey} of double angle quotation marks in natural
+ * order.
+ */
+ public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_LR; }
+
+ /**
+ * Get single angle quotation marks in natural order.
+ * @return the array of {@link ExpectedKey} of single angle quotation marks in natural
+ * order.
+ */
+ public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_LR; }
+
+ /**
+ * Get the left shift keys.
+ * @param isPhone true if requesting phone's keys.
+ * @return the array of {@link ExpectedKey} that should be placed at left edge of the
+ * keyboard.
+ */
+ public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
+ return joinKeys(SHIFT_KEY);
+ }
+
+ /**
+ * Get the right shift keys.
+ * @param isPhone true if requesting phone's keys.
+ * @return the array of {@link ExpectedKey} that should be placed at right edge of the
+ * keyboard.
+ */
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return isPhone ? EMPTY_KEYS : joinKeys(EXCLAMATION_AND_QUESTION_MARKS, SHIFT_KEY);
+ }
+
+ /**
+ * Get the enter key.
+ * @param isPhone true if requesting phone's key.
+ * @return the array of {@link ExpectedKey} that should be placed as an enter key.
+ */
+ public ExpectedKey getEnterKey(final boolean isPhone) {
+ return isPhone ? key(ENTER_KEY, EMOJI_ACTION_KEY) : ENTER_KEY;
+ }
+
+ /**
+ * Get the emoji key.
+ * @param isPhone true if requesting phone's key.
+ * @return the array of {@link ExpectedKey} that should be placed as an emoji key.
+ */
+ public ExpectedKey getEmojiKey(final boolean isPhone) {
+ return EMOJI_NORMAL_KEY;
+ }
+
+ /**
+ * Get the space keys.
+ * @param isPhone true if requesting phone's keys.
+ * @return the array of {@link ExpectedKey} that should be placed at the center of the
+ * keyboard.
+ */
+ public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
+ return joinKeys(LANGUAGE_SWITCH_KEY, SPACE_KEY);
+ }
+
+ /**
+ * Get the keys left to the spacebar.
+ * @param isPhone true if requesting phone's keys.
+ * @return the array of {@link ExpectedKey} that should be placed at left of the spacebar.
+ */
+ public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
+ // U+002C: "," COMMA
+ return joinKeys(key("\u002C", SETTINGS_KEY));
+ }
+
+ /**
+ * Get the keys right to the spacebar.
+ * @param isPhone true if requesting phone's keys.
+ * @return the array of {@link ExpectedKey} that should be placed at right of the spacebar.
+ */
+ public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
+ final ExpectedKey periodKey = key(".", getPunctuationMoreKeys(isPhone));
+ return joinKeys(periodKey);
+ }
+
+ /**
+ * Get "more keys" for the punctuation key (usually the period key).
+ * @param isPhone true if requesting phone's keys.
+ * @return the array of {@link ExpectedKey} that are "more keys" of the punctuation key.
+ */
+ public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
+ return isPhone ? PHONE_PUNCTUATION_MORE_KEYS : TABLET_PUNCTUATION_MORE_KEYS;
+ }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/NepaliCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/NepaliCustomizer.java
new file mode 100644
index 000000000..7a00d80a0
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/NepaliCustomizer.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.SymbolsShifted;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+
+import java.util.Locale;
+
+public class NepaliCustomizer extends DevanagariCustomizer {
+ public NepaliCustomizer(final Locale locale) { super(locale); }
+
+ @Override
+ public ExpectedKey getCurrencyKey() { return CURRENCY_NEPALI; }
+
+ @Override
+ public ExpectedKey[] getOtherCurrencyKeys() {
+ return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
+ }
+
+ @Override
+ public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
+ return joinKeys(LANGUAGE_SWITCH_KEY, SPACE_KEY, key(ZWNJ_KEY, ZWJ_KEY));
+ }
+
+ // U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN
+ private static final ExpectedKey CURRENCY_NEPALI = key("\u0930\u0941\u002E",
+ Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.POUND_SIGN,
+ Symbols.YEN_SIGN, Symbols.PESO_SIGN);
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/NoLanguageCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/NoLanguageCustomizer.java
similarity index 97%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/NoLanguageCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/NoLanguageCustomizer.java
index 9edbcab69..b6bf5bfeb 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/NoLanguageCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/NoLanguageCustomizer.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class NoLanguageCustomizer extends LayoutCustomizer {
- NoLanguageCustomizer(final Locale locale) { super(locale); }
+public class NoLanguageCustomizer extends LayoutCustomizer {
+ public NoLanguageCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/NorwegianCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/NorwegianCustomizer.java
similarity index 95%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/NorwegianCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/NorwegianCustomizer.java
index 4be7a57c5..6cc44e578 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/NorwegianCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/NorwegianCustomizer.java
@@ -14,17 +14,16 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
import com.android.inputmethod.keyboard.layout.Nordic;
import com.android.inputmethod.keyboard.layout.Symbols;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class NorwegianCustomizer extends LayoutCustomizer {
+public class NorwegianCustomizer extends LayoutCustomizer {
public NorwegianCustomizer(final Locale locale) { super(locale); }
@Override
@@ -93,4 +92,4 @@ class NorwegianCustomizer extends LayoutCustomizer {
// U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
.setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B");
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/PcQwertyCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/PcQwertyCustomizer.java
new file mode 100644
index 000000000..9a0f764ae
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/PcQwertyCustomizer.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+
+import java.util.Locale;
+
+public class PcQwertyCustomizer extends LayoutCustomizer {
+ public PcQwertyCustomizer(final Locale locale) { super(locale); }
+
+ @Override
+ public int getNumberOfRows() { return 5; }
+
+ @Override
+ public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
+ return joinKeys(SHIFT_KEY);
+ }
+
+ @Override
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return joinKeys(SHIFT_KEY);
+ }
+
+ @Override
+ public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
+ return joinKeys(SETTINGS_KEY);
+ }
+
+ @Override
+ public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
+ return isPhone
+ ? joinKeys(key(ENTER_KEY, EMOJI_ACTION_KEY))
+ : joinKeys(EMOJI_NORMAL_KEY);
+ }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/PortugueseCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/PortugueseCustomizer.java
similarity index 94%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/PortugueseCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/PortugueseCustomizer.java
index 629e8cb8b..4fc64cc62 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/PortugueseCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/PortugueseCustomizer.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class PortugueseCustomizer extends LayoutCustomizer {
- PortugueseCustomizer(final Locale locale) { super(locale); }
+public class PortugueseCustomizer extends LayoutCustomizer {
+ public PortugueseCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/SerbianLatinCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/SerbianLatinCustomizer.java
similarity index 90%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/SerbianLatinCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/SerbianLatinCustomizer.java
index 3660ce4b7..4d03c8ba6 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/SerbianLatinCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/SerbianLatinCustomizer.java
@@ -14,22 +14,20 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.SerbianQwertz;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class SerbianLatinCustomizer extends LayoutCustomizer {
+public class SerbianLatinCustomizer extends LayoutCustomizer {
public SerbianLatinCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : LayoutBase.EXCLAMATION_AND_QUESTION_MARKS;
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
}
protected void setSerbianKeys(final ExpectedKeyboardBuilder builder) {
@@ -79,4 +77,4 @@ class SerbianLatinCustomizer extends LayoutCustomizer {
// U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
.setMoreKeysOf("i", "\u00EC");
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/SouthSlavicLayoutCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/SouthSlavicLayoutCustomizer.java
new file mode 100644
index 000000000..cc41d37ca
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/SouthSlavicLayoutCustomizer.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.latin.Constants;
+
+import java.util.Locale;
+
+public class SouthSlavicLayoutCustomizer extends LayoutCustomizer {
+ public SouthSlavicLayoutCustomizer(final Locale locale) {
+ super(locale);
+ }
+
+ @Override
+ public final ExpectedKey getAlphabetKey() { return SOUTH_SLAVIC_ALPHABET_KEY; }
+
+ @Override
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
+ }
+
+ // U+0410: "А" CYRILLIC CAPITAL LETTER A
+ // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
+ // U+0412: "В" CYRILLIC CAPITAL LETTER VE
+ private static final ExpectedKey SOUTH_SLAVIC_ALPHABET_KEY = key(
+ "\u0410\u0411\u0412", Constants.CODE_SWITCH_ALPHA_SYMBOL);
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/SpanishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/SpanishCustomizer.java
similarity index 89%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/SpanishCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/SpanishCustomizer.java
index 8974ad6ec..1284f054e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/SpanishCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/SpanishCustomizer.java
@@ -14,28 +14,24 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Spanish;
-import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class SpanishCustomizer extends LayoutCustomizer {
- SpanishCustomizer(final Locale locale) { super(locale); }
+public class SpanishCustomizer extends LayoutCustomizer {
+ public SpanishCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
- return isPhone ? PHONE_PUNCTUATION_MORE_KEYS
- : LayoutBase.TABLET_PUNCTUATION_MORE_KEYS;
+ return isPhone ? SPANISH_PHONE_PUNCTUATION_MORE_KEYS : TABLET_PUNCTUATION_MORE_KEYS;
}
// Punctuation more keys for phone form factor.
- private static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = AbstractLayoutBase.joinKeys(
+ private static final ExpectedKey[] SPANISH_PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
// U+00A1: "¡" INVERTED EXCLAMATION MARK
// U+00BF: "¿" INVERTED QUESTION MARK
",", "?", "!", "#", ")", "(", "/", ";", "\u00A1",
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/SwedishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/SwedishCustomizer.java
similarity index 96%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/SwedishCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/SwedishCustomizer.java
index af4a971bd..f4ff59458 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/SwedishCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/SwedishCustomizer.java
@@ -14,10 +14,8 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Nordic;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
@@ -25,7 +23,7 @@ import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class SwedishCustomizer extends LayoutCustomizer {
+public class SwedishCustomizer extends LayoutCustomizer {
private final LayoutCustomizer mEuroCustomizer;
public SwedishCustomizer(final Locale locale) {
@@ -142,4 +140,4 @@ class SwedishCustomizer extends LayoutCustomizer {
// U+0148: "ň" LATIN SMALL LETTER N WITH CARON
.setMoreKeysOf("n", "\u0144", "\u00F1", "\u0148");
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/customizer/TamilCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/TamilCustomizer.java
new file mode 100644
index 000000000..91fd21ef5
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/TamilCustomizer.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.customizer;
+
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.latin.Constants;
+
+import java.util.Locale;
+
+public class TamilCustomizer extends LayoutCustomizer {
+ public TamilCustomizer(final Locale locale) { super(locale); }
+
+ @Override
+ public ExpectedKey getAlphabetKey() { return TAMIL_ALPHABET_KEY; }
+
+ @Override
+ public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
+ return EMPTY_KEYS;
+ }
+
+ @Override
+ public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
+ }
+
+ // U+0BA4: "த" TAMIL LETTER TA
+ // U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I
+ // U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA
+ private static final ExpectedKey TAMIL_ALPHABET_KEY = key(
+ "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", Constants.CODE_SWITCH_ALPHA_SYMBOL);
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TurkicCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/TurkicCustomizer.java
similarity index 95%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/TurkicCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/TurkicCustomizer.java
index 1a98f6ccf..3fd3aa219 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TurkicCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/TurkicCustomizer.java
@@ -14,9 +14,8 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -24,7 +23,7 @@ import java.util.Locale;
/**
* Turkic languages layout customizer.
*/
-class TurkicCustomizer extends LayoutCustomizer {
+public class TurkicCustomizer extends LayoutCustomizer {
public TurkicCustomizer(final Locale locale) { super(locale); }
@Override
@@ -82,4 +81,4 @@ class TurkicCustomizer extends LayoutCustomizer {
// U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
.setMoreKeysOf("n", "\u0148", "\u00F1");
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/UzbekCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/customizer/UzbekCustomizer.java
similarity index 89%
rename from tests/src/com/android/inputmethod/keyboard/layout/tests/UzbekCustomizer.java
rename to tests/src/com/android/inputmethod/keyboard/layout/customizer/UzbekCustomizer.java
index 6da0b0e45..99486163e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/UzbekCustomizer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/customizer/UzbekCustomizer.java
@@ -14,17 +14,15 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard.layout.tests;
+package com.android.inputmethod.keyboard.layout.customizer;
import com.android.inputmethod.keyboard.layout.Nordic;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
-class UzbekCustomizer extends TurkicCustomizer {
- public UzbekCustomizer(final Locale locale) {
- super(locale);
- }
+public class UzbekCustomizer extends TurkicCustomizer {
+ public UzbekCustomizer(final Locale locale) { super(locale); }
protected void setUzbekKeys(final ExpectedKeyboardBuilder builder) {
builder
@@ -41,4 +39,4 @@ class UzbekCustomizer extends TurkicCustomizer {
setUzbekKeys(builder);
return super.setAccentedLetters(builder);
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java
index 3556cb4bf..b15ef5d26 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java
@@ -16,7 +16,9 @@
package com.android.inputmethod.keyboard.layout.expected;
+import com.android.inputmethod.keyboard.internal.KeyboardIconsSet;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey;
+import com.android.inputmethod.latin.Constants;
/**
* Base class to create an expected keyboard for unit test.
@@ -102,4 +104,75 @@ public abstract class AbstractLayoutBase {
public static ExpectedKey[] joinKeys(final Object ... keys) {
return ExpectedKeyboardBuilder.joinKeys(keys);
}
+
+ // Icon ids.
+ private static final int ICON_DELETE = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_DELETE_KEY);
+ private static final int ICON_SPACE = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_SPACE_KEY);
+ private static final int ICON_TAB = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_TAB_KEY);
+ private static final int ICON_SHORTCUT = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_SHORTCUT_KEY);
+ private static final int ICON_SETTINGS = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_SETTINGS_KEY);
+ private static final int ICON_LANGUAGE_SWITCH = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_LANGUAGE_SWITCH_KEY);
+ private static final int ICON_ENTER = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_ENTER_KEY);
+ private static final int ICON_EMOJI_ACTION = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_EMOJI_ACTION_KEY);
+ private static final int ICON_EMOJI_NORMAL = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_EMOJI_NORMAL_KEY);
+ private static final int ICON_SHIFT = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_SHIFT_KEY);
+ private static final int ICON_SHIFTED_SHIFT = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_SHIFT_KEY_SHIFTED);
+ private static final int ICON_ZWNJ = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_ZWNJ_KEY);
+ private static final int ICON_ZWJ = KeyboardIconsSet.getIconId(
+ KeyboardIconsSet.NAME_ZWJ_KEY);
+
+ // Functional keys.
+ protected static final ExpectedKey DELETE_KEY = key(ICON_DELETE, Constants.CODE_DELETE);
+ protected static final ExpectedKey TAB_KEY = key(ICON_TAB, Constants.CODE_TAB);
+ protected static final ExpectedKey SHORTCUT_KEY = key(ICON_SHORTCUT, Constants.CODE_SHORTCUT);
+ protected static final ExpectedKey SETTINGS_KEY = key(ICON_SETTINGS, Constants.CODE_SETTINGS);
+ protected static final ExpectedKey LANGUAGE_SWITCH_KEY = key(
+ ICON_LANGUAGE_SWITCH, Constants.CODE_LANGUAGE_SWITCH);
+ protected static final ExpectedKey ENTER_KEY = key(ICON_ENTER, Constants.CODE_ENTER);
+ protected static final ExpectedKey EMOJI_ACTION_KEY = key(ICON_EMOJI_ACTION, Constants.CODE_EMOJI);
+ protected static final ExpectedKey EMOJI_NORMAL_KEY = key(ICON_EMOJI_NORMAL, Constants.CODE_EMOJI);
+ protected static final ExpectedKey SPACE_KEY = key(ICON_SPACE, Constants.CODE_SPACE);
+ protected static final ExpectedKey CAPSLOCK_MORE_KEY = key(" ", Constants.CODE_CAPSLOCK);
+ protected static final ExpectedKey SHIFT_KEY = key(ICON_SHIFT,
+ Constants.CODE_SHIFT, CAPSLOCK_MORE_KEY);
+ protected static final ExpectedKey SHIFTED_SHIFT_KEY = key(ICON_SHIFTED_SHIFT,
+ Constants.CODE_SHIFT, CAPSLOCK_MORE_KEY);
+ protected static final ExpectedKey ALPHABET_KEY = key("ABC", Constants.CODE_SWITCH_ALPHA_SYMBOL);
+ protected static final ExpectedKey SYMBOLS_KEY = key("?123", Constants.CODE_SWITCH_ALPHA_SYMBOL);
+ protected static final ExpectedKey BACK_TO_SYMBOLS_KEY = key("?123", Constants.CODE_SHIFT);
+ protected static final ExpectedKey SYMBOLS_SHIFT_KEY = key("= \\ <", Constants.CODE_SHIFT);
+ protected static final ExpectedKey TABLET_SYMBOLS_SHIFT_KEY = key("~ [ <", Constants.CODE_SHIFT);
+
+ // U+00A1: "¡" INVERTED EXCLAMATION MARK
+ // U+00BF: "¿" INVERTED QUESTION MARK
+ protected static final ExpectedKey[] EXCLAMATION_AND_QUESTION_MARKS = joinKeys(
+ key("!", moreKey("\u00A1")), key("?", moreKey("\u00BF")));
+ // U+200C: ZERO WIDTH NON-JOINER
+ // U+200D: ZERO WIDTH JOINER
+ protected static final ExpectedKey ZWNJ_KEY = key(ICON_ZWNJ, "\u200C");
+ protected static final ExpectedKey ZWJ_KEY = key(ICON_ZWJ, "\u200D");
+ // Domain key
+ protected static final ExpectedKey DOMAIN_KEY =
+ key(".com", joinMoreKeys(".net", ".org", ".gov", ".edu")).preserveCase();
+
+ // Punctuation more keys for phone form factor.
+ protected static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
+ ",", "?", "!", "#", ")", "(", "/", ";",
+ "'", "@", ":", "-", "\"", "+", "%", "&");
+ // Punctuation more keys for tablet form factor.
+ protected static final ExpectedKey[] TABLET_PUNCTUATION_MORE_KEYS = joinKeys(
+ ",", "'", "#", ")", "(", "/", ";",
+ "@", ":", "-", "\"", "+", "%", "&");
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java
index cd2259888..f534cd6fc 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java
@@ -19,8 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArabic.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArabic.java
index fd7670827..a9be163d1 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArabic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArabic.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Arabic;
-import com.android.inputmethod.keyboard.layout.Arabic.ArabicCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public class TestsArabic extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("ar");
- private static final LayoutBase LAYOUT = new Arabic(new ArabicCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Arabic(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArmenianAMPhonetic.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArmenianAMPhonetic.java
index 327e9438f..8ef97d21e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArmenianAMPhonetic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArmenianAMPhonetic.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.ArmenianPhonetic;
-import com.android.inputmethod.keyboard.layout.ArmenianPhonetic.ArmenianPhoneticCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,8 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsArmenianAMPhonetic extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("hy", "AM");
- private static final LayoutBase LAYOUT = new ArmenianPhonetic(
- new ArmenianPhoneticCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new ArmenianPhonetic(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java
index 8e0e2bbbd..a10023c69 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.TurkicCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBasqueES.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBasqueES.java
index bef18c5d5..103fac168 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBasqueES.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBasqueES.java
@@ -19,8 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Spanish;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.SpanishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -39,7 +40,7 @@ public class TestsBasqueES extends LayoutTestsBase {
private static class BasqueESCustomizer extends EuroCustomizer {
private final SpanishCustomizer mSpanishCustomizer;
- public BasqueESCustomizer(final Locale locale) {
+ BasqueESCustomizer(final Locale locale) {
super(locale);
mSpanishCustomizer = new SpanishCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java
index c5238d54f..0b2393363 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.EastSlavic;
-import com.android.inputmethod.keyboard.layout.EastSlavic.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsBelarusianBY extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class BelarusianBYCustomizer extends EastSlavicCustomizer {
- public BelarusianBYCustomizer(final Locale locale) { super(locale); }
+ BelarusianBYCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java
index 0334d5d23..62625890e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java
@@ -21,6 +21,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.BengaliAkkhor;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.BengaliCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -37,11 +38,11 @@ public final class TestsBengaliBD extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class BengaliBDCustomzier extends BengaliCustomizer {
- public BengaliBDCustomzier(final Locale locale) { super(locale); }
+ BengaliBDCustomzier(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
- return isPhone ? EMPTY_KEYS : LayoutBase.EXCLAMATION_AND_QUESTION_MARKS;
+ return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
}
@Override
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliIN.java
index 91a976c7c..022b0850d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliIN.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliIN.java
@@ -21,6 +21,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Bengali;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.BengaliCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -37,7 +38,7 @@ public final class TestsBengaliIN extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class BengaliINCustomzier extends BengaliCustomizer {
- public BengaliINCustomzier(final Locale locale) { super(locale); }
+ BengaliINCustomzier(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) { return EMPTY_KEYS; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarian.java
index ded8d7243..15308271c 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarian.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Bulgarian;
-import com.android.inputmethod.keyboard.layout.Bulgarian.BulgarianCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsBulgarian extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("bg");
- private static final LayoutBase LAYOUT = new Bulgarian(new BulgarianCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Bulgarian(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarianBds.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarianBds.java
index 22b2011ee..558b1d44a 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarianBds.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarianBds.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.BulgarianBds;
-import com.android.inputmethod.keyboard.layout.BulgarianBds.BulgarianBdsCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsBulgarianBds extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("bg");
- private static final LayoutBase LAYOUT = new BulgarianBds(new BulgarianBdsCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new BulgarianBds(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java
index 151a0a627..a323ffda4 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java
@@ -19,8 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Spanish;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -38,20 +38,20 @@ public class TestsCatalan extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class CatalanCustomizer extends EuroCustomizer {
- public CatalanCustomizer(final Locale locale) { super(locale); }
+ CatalanCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
- return isPhone ? PHONE_PUNCTUATION_MORE_KEYS
- : TABLET_PUNCTUATION_MORE_KEYS;
+ return isPhone ? CATALAN_PHONE_PUNCTUATION_MORE_KEYS
+ : CATALAN_TABLET_PUNCTUATION_MORE_KEYS;
}
// U+00B7: "·" MIDDLE DOT
- private static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
+ private static final ExpectedKey[] CATALAN_PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
",", "?", "!", "\u00B7", "#", ")", "(", "/", ";",
"'", "@", ":", "-", "\"", "+", "%", "&");
- private static final ExpectedKey[] TABLET_PUNCTUATION_MORE_KEYS = joinKeys(
+ private static final ExpectedKey[] CATALAN_TABLET_PUNCTUATION_MORE_KEYS = joinKeys(
",", "'", "\u00B7", "#", ")", "(", "/", ";",
"@", ":", "-", "\"", "+", "%", "&");
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java
index 8575ef219..d8af75bca 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwertz;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsCroatian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class CroatianCustomizer extends LayoutCustomizer {
- public CroatianCustomizer(final Locale locale) { super(locale); }
+ CroatianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java
index f4794707f..f05b8ebf2 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwertz;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsCzech extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class CzechCustomizer extends LayoutCustomizer {
- public CzechCustomizer(final Locale locale) { super(locale); }
+ CzechCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java
index bf43e5296..fb7338d1b 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.customizer.DanishCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java
index 886b3de7e..718bf8aec 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwertz;
+import com.android.inputmethod.keyboard.layout.customizer.DanishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -36,9 +37,7 @@ public final class TestsDanishQwertz extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class DanishQwertyCustomizer extends DanishCustomizer {
- public DanishQwertyCustomizer(final Locale locale) {
- super(locale);
- }
+ DanishQwertyCustomizer(final Locale locale) { super(locale); }
@Override
protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java
index 1730f66be..12bd1b176 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java
@@ -19,11 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
-import com.android.inputmethod.keyboard.layout.Symbols;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+import com.android.inputmethod.keyboard.layout.customizer.DutchCustomizer;
import java.util.Locale;
@@ -37,70 +34,4 @@ public final class TestsDutch extends LayoutTestsBase {
@Override
LayoutBase getLayout() { return LAYOUT; }
-
- static class DutchCustomizer extends EuroCustomizer {
- public DutchCustomizer(final Locale locale) { super(locale); }
-
- @Override
- public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
-
- @Override
- public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_L9R; }
-
- @Override
- public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
- return builder
- // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
- // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
- // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
- // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
- // U+00E6: "æ" LATIN SMALL LETTER AE
- // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
- // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
- // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
- .setMoreKeysOf("a",
- "\u00E1", "\u00E4", "\u00E2", "\u00E0", "\u00E6", "\u00E3", "\u00E5",
- "\u0101")
- // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
- // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
- // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
- // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
- // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
- // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
- // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
- .setMoreKeysOf("e",
- "\u00E9", "\u00EB", "\u00EA", "\u00E8", "\u0119", "\u0117", "\u0113")
- // U+0133: "ij" LATIN SMALL LIGATURE IJ
- .setMoreKeysOf("y", "\u0133")
- // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
- // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
- // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
- // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
- // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
- .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
- // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
- // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
- // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
- // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
- // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
- // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
- // U+0133: "ij" LATIN SMALL LIGATURE IJ
- .setMoreKeysOf("i",
- "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B", "\u0133")
- // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
- // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
- // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
- // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
- // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
- // U+0153: "œ" LATIN SMALL LIGATURE OE
- // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
- // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
- .setMoreKeysOf("o",
- "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8",
- "\u014D")
- // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
- // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
- .setMoreKeysOf("n", "\u00F1", "\u0144");
- }
- }
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java
index 31adf7a8d..146411858 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java
@@ -20,7 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Azerty;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.tests.TestsDutch.DutchCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.DutchCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakEmail.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakEmail.java
index b25b84674..3966ebc06 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakEmail.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakEmail.java
@@ -25,8 +25,9 @@ import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.KeyboardLayoutSet;
import com.android.inputmethod.keyboard.layout.Dvorak;
import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.customizer.DvorakCustomizer.EnglishDvorakCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-import com.android.inputmethod.keyboard.layout.tests.TestsEnglishDvorak.EnglishDvorakCustomizer;
import java.util.Locale;
@@ -60,23 +61,23 @@ public class TestsDvorakEmail extends LayoutTestsBase {
@Override
public ExpectedKey getEnterKey(final boolean isPhone) {
- return isPhone ? LayoutBase.ENTER_KEY : super.getEnterKey(isPhone);
+ return isPhone ? ENTER_KEY : super.getEnterKey(isPhone);
}
@Override
public ExpectedKey getEmojiKey(final boolean isPhone) {
- return LayoutBase.DOMAIN_KEY;
+ return DOMAIN_KEY;
}
@Override
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
return isPhone ? super.getKeysLeftToSpacebar(isPhone)
- : joinKeys(key("@", LayoutBase.SETTINGS_KEY));
+ : joinKeys(key("@", SETTINGS_KEY));
}
}
private static class DvorakEmail extends Dvorak {
- public DvorakEmail(final LayoutCustomizer customizer) {
+ DvorakEmail(final LayoutCustomizer customizer) {
super(customizer);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakUrl.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakUrl.java
index ba22f375d..67e0d91af 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakUrl.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakUrl.java
@@ -25,8 +25,9 @@ import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.KeyboardLayoutSet;
import com.android.inputmethod.keyboard.layout.Dvorak;
import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.customizer.DvorakCustomizer.EnglishDvorakCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-import com.android.inputmethod.keyboard.layout.tests.TestsEnglishDvorak.EnglishDvorakCustomizer;
import java.util.Locale;
@@ -54,31 +55,27 @@ public class TestsDvorakUrl extends LayoutTestsBase {
}
private static class DvorakUrlCustomizer extends EnglishDvorakCustomizer {
- DvorakUrlCustomizer(final Locale locale) {
- super(locale);
- }
+ DvorakUrlCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getEnterKey(final boolean isPhone) {
- return isPhone ? LayoutBase.ENTER_KEY : super.getEnterKey(isPhone);
+ return isPhone ? ENTER_KEY : super.getEnterKey(isPhone);
}
@Override
public ExpectedKey getEmojiKey(final boolean isPhone) {
- return LayoutBase.DOMAIN_KEY;
+ return DOMAIN_KEY;
}
@Override
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
return isPhone ? super.getKeysLeftToSpacebar(isPhone)
- : joinKeys(key("/", LayoutBase.SETTINGS_KEY));
+ : joinKeys(key("/", SETTINGS_KEY));
}
}
private static class DvorakEmail extends Dvorak {
- public DvorakEmail(final LayoutCustomizer customizer) {
- super(customizer);
- }
+ DvorakEmail(final LayoutCustomizer customizer) { super(customizer); }
@Override
protected ExpectedKey getRow1_1Key(final boolean isPhone, final int elementId) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java
index e647f8aea..2b25f813c 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java
@@ -19,9 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Dvorak;
-import com.android.inputmethod.keyboard.layout.Dvorak.DvorakCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+import com.android.inputmethod.keyboard.layout.customizer.DvorakCustomizer.EnglishDvorakCustomizer;
import java.util.Locale;
@@ -35,18 +34,4 @@ public class TestsEnglishDvorak extends LayoutTestsBase {
@Override
LayoutBase getLayout() { return LAYOUT; }
-
- public static class EnglishDvorakCustomizer extends DvorakCustomizer {
- private final EnglishCustomizer mEnglishCustomizer;
-
- EnglishDvorakCustomizer(final Locale locale) {
- super(locale);
- mEnglishCustomizer = new EnglishCustomizer(locale);
- }
-
- @Override
- public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
- return mEnglishCustomizer.setAccentedLetters(builder);
- }
- }
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishIN.java
index c80b25024..54759cef1 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishIN.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishIN.java
@@ -22,6 +22,7 @@ import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted;
+import com.android.inputmethod.keyboard.layout.customizer.EnglishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -38,7 +39,7 @@ public final class TestsEnglishIN extends TestsEnglishUS {
LayoutBase getLayout() { return LAYOUT; }
private static class EnglishINCustomizer extends EnglishCustomizer {
- public EnglishINCustomizer(final Locale locale) { super(locale); }
+ EnglishINCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java
index c0dcbdc06..714a6001a 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java
@@ -21,6 +21,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.EnglishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -37,7 +38,7 @@ public final class TestsEnglishUK extends TestsEnglishUS {
LayoutBase getLayout() { return LAYOUT; }
private static class EnglishUKCustomizer extends EnglishCustomizer {
- public EnglishUKCustomizer(final Locale locale) { super(locale); }
+ EnglishUKCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_POUND; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java
index 6ea8f6000..570ee9d0b 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EnglishCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java
index 6a44187c9..a6792e28e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java
@@ -19,8 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Spanish;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -37,7 +37,7 @@ public class TestsEsperanto extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class EsperantoCustomizer extends LayoutCustomizer {
- public EsperantoCustomizer(final Locale locale) { super(locale); }
+ EsperantoCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java
index 28c2eb301..8cb67e223 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.customizer.EstonianEECustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEEQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEEQwerty.java
index ab8960b66..fb7c24371 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEEQwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEEQwerty.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EstonianEECustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -36,9 +37,7 @@ public final class TestsEstonianEEQwerty extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class EstonianEEQwertyCustomizer extends EstonianEECustomizer {
- public EstonianEEQwertyCustomizer(final Locale locale) {
- super(locale);
- }
+ EstonianEEQwertyCustomizer(final Locale locale) { super(locale); }
@Override
protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java
index 05def96be..3d42f30fd 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.customizer.FinnishCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java
index c3df9d115..c81b2a2bc 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.FinnishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -36,9 +37,7 @@ public final class TestsFinnishQwerty extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class FinnishQwertyCustomizer extends FinnishCustomizer {
- public FinnishQwertyCustomizer(final Locale locale) {
- super(locale);
- }
+ FinnishQwertyCustomizer(final Locale locale) { super(locale); }
@Override
protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java
index 7ced1fb7b..ca663f4f6 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java
@@ -20,8 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Azerty;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.customizer.FrenchCustomizer.FrenchEuroCustomizer;
import java.util.Locale;
@@ -35,21 +34,4 @@ public final class TestsFrench extends LayoutTestsBase {
@Override
LayoutBase getLayout() { return LAYOUT; }
-
- static final class FrenchEuroCustomizer extends FrenchCustomizer {
- private final EuroCustomizer mEuroCustomizer;
-
- public FrenchEuroCustomizer(final Locale locale) {
- super(locale);
- mEuroCustomizer = new EuroCustomizer(locale);
- }
-
- @Override
- public final ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); }
-
- @Override
- public final ExpectedKey[] getOtherCurrencyKeys() {
- return mEuroCustomizer.getOtherCurrencyKeys();
- }
- }
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java
index 9b3cd1ee2..12c94b141 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.FrenchCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java
index 2598aa3bf..2461157e6 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Swiss;
+import com.android.inputmethod.keyboard.layout.customizer.FrenchCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -36,7 +37,7 @@ public final class TestsFrenchCH extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class FrenchCHCustomizer extends FrenchCustomizer {
- public FrenchCHCustomizer(final Locale locale) { super(locale); }
+ FrenchCHCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java
index 33d1445a4..40530638b 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java
@@ -19,11 +19,11 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Dvorak;
-import com.android.inputmethod.keyboard.layout.Dvorak.DvorakCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.customizer.DvorakCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.FrenchCustomizer.FrenchEuroCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
-import com.android.inputmethod.keyboard.layout.tests.TestsFrench.FrenchEuroCustomizer;
import java.util.Locale;
@@ -41,7 +41,7 @@ public final class TestsFrenchDvorak extends LayoutTestsBase {
private static class FrenchDvorakCustomizer extends DvorakCustomizer {
private final FrenchEuroCustomizer mFrenchEuroCustomizer;
- public FrenchDvorakCustomizer(final Locale locale) {
+ FrenchDvorakCustomizer(final Locale locale) {
super(locale);
mFrenchEuroCustomizer = new FrenchEuroCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java
index 6ab28704a..67edacea7 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java
@@ -20,7 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwertz;
-import com.android.inputmethod.keyboard.layout.tests.TestsFrench.FrenchEuroCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.FrenchCustomizer.FrenchEuroCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGalicianES.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGalicianES.java
index 1472828a4..c37fff254 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGalicianES.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGalicianES.java
@@ -19,8 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Spanish;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.SpanishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -39,7 +40,7 @@ public class TestsGalicianES extends LayoutTestsBase {
private static class GalicianESCustomizer extends EuroCustomizer {
private final SpanishCustomizer mSpanishCustomizer;
- public GalicianESCustomizer(final Locale locale) {
+ GalicianESCustomizer(final Locale locale) {
super(locale);
mSpanishCustomizer = new SpanishCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGeorgianGE.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGeorgianGE.java
index f25942fb5..f6e3080c7 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGeorgianGE.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGeorgianGE.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Georgian;
-import com.android.inputmethod.keyboard.layout.Georgian.GeorgianCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsGeorgianGE extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("ka", "GE");
- private static final LayoutBase LAYOUT = new Georgian(new GeorgianCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Georgian(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java
index 6f7571197..52c5a0688 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java
@@ -19,9 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Qwertz;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.customizer.GermanCustomizer.GermanEuroCustomizer;
import java.util.Locale;
@@ -35,21 +34,4 @@ public final class TestsGerman extends LayoutTestsBase {
@Override
LayoutBase getLayout() { return LAYOUT; }
-
- static class GermanEuroCustomizer extends GermanCustomizer {
- final EuroCustomizer mEuroCustomizer;
-
- public GermanEuroCustomizer(final Locale locale) {
- super(locale);
- mEuroCustomizer = new EuroCustomizer(locale);
- }
-
- @Override
- public ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); }
-
- @Override
- public ExpectedKey[] getOtherCurrencyKeys() {
- return mEuroCustomizer.getOtherCurrencyKeys();
- }
- }
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java
index 7deb00bb4..10981d920 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Swiss;
+import com.android.inputmethod.keyboard.layout.customizer.GermanCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -36,7 +37,7 @@ public final class TestsGermanCH extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class GermanCHCustomizer extends GermanCustomizer {
- public GermanCHCustomizer(final Locale locale) { super(locale); }
+ GermanCHCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java
index b28d5cfcf..36d1cb8c4 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java
@@ -19,10 +19,11 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Dvorak;
-import com.android.inputmethod.keyboard.layout.Dvorak.DvorakCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted;
+import com.android.inputmethod.keyboard.layout.customizer.DvorakCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.GermanCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,10 +40,10 @@ public final class TestsGermanDvorak extends LayoutTestsBase {
@Override
LayoutBase getLayout() { return LAYOUT; }
- static class GermanDvorakCustomizer extends DvorakCustomizer {
- final GermanCustomizer mGermanCustomizer;
+ private static class GermanDvorakCustomizer extends DvorakCustomizer {
+ private final GermanCustomizer mGermanCustomizer;
- public GermanDvorakCustomizer(final Locale locale) {
+ GermanDvorakCustomizer(final Locale locale) {
super(locale);
mGermanCustomizer = new GermanCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java
index 19ae5a3f5..6db942f2a 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java
@@ -20,7 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
-import com.android.inputmethod.keyboard.layout.tests.TestsGerman.GermanEuroCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.GermanCustomizer.GermanEuroCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGreek.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGreek.java
index 4acb119ac..fd21d522c 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGreek.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGreek.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Greek;
-import com.android.inputmethod.keyboard.layout.Greek.GreekCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public class TestsGreek extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("el");
- private static final LayoutBase LAYOUT = new Greek(new GreekCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Greek(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHebrew.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHebrew.java
index c0243a870..cc6304881 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHebrew.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHebrew.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Hebrew;
-import com.android.inputmethod.keyboard.layout.Hebrew.HebrewCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public class TestsHebrew extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("iw");
- private static final LayoutBase LAYOUT = new Hebrew(new HebrewCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Hebrew(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindi.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindi.java
index abea51a8d..53652fce0 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindi.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindi.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Hindi;
import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.customizer.HindiCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindiCompact.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindiCompact.java
index 2e676df26..cfe3e9ea5 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindiCompact.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindiCompact.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.HindiCompact;
-import com.android.inputmethod.keyboard.layout.HindiCompact.HindiCompactCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsHindiCompact extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("hi");
- private static final LayoutBase LAYOUT = new HindiCompact(new HindiCompactCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new HindiCompact(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java
index 2a6e46f96..613b3bbc2 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java
@@ -19,10 +19,10 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -39,7 +39,7 @@ public final class TestsHinglish extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class HinglishCustomizer extends LayoutCustomizer {
- public HinglishCustomizer(final Locale locale) { super(locale); }
+ HinglishCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java
index efc95dcf9..a32e2b551 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwertz;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsHungarian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class HungarianCustomizer extends LayoutCustomizer {
- public HungarianCustomizer(final Locale locale) { super(locale); }
+ HungarianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java
index 62b111e6a..8eabf1815 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsIcelandic extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class IcelandicCustomizer extends LayoutCustomizer {
- public IcelandicCustomizer(final Locale locale) { super(locale); }
+ IcelandicCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIndonesian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIndonesian.java
index 9b23bfe2b..83711714d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIndonesian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIndonesian.java
@@ -19,8 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java
index f3c610c8b..2acc9679b 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java
@@ -19,8 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.ItalianCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -39,7 +40,7 @@ public final class TestsItalian extends LayoutTestsBase {
private static class ItalianITCustomizer extends EuroCustomizer {
private final ItalianCustomizer mItalianCustomizer;
- public ItalianITCustomizer(final Locale locale) {
+ ItalianITCustomizer(final Locale locale) {
super(locale);
mItalianCustomizer = new ItalianCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalianCH.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalianCH.java
index d32f9e957..f98545a50 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalianCH.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalianCH.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Swiss;
+import com.android.inputmethod.keyboard.layout.customizer.ItalianCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -36,7 +37,7 @@ public final class TestsItalianCH extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class ItalianCHCustomizer extends ItalianCustomizer {
- public ItalianCHCustomizer(final Locale locale) { super(locale); }
+ ItalianCHCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKannadaIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKannadaIN.java
index d1866e803..a0ff1d0ac 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKannadaIN.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKannadaIN.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Kannada;
-import com.android.inputmethod.keyboard.layout.Kannada.KannadaCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsKannadaIN extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("kn", "IN");
- private static final LayoutBase LAYOUT = new Kannada(new KannadaCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Kannada(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java
index d255a0fa9..66ece29ee 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java
@@ -19,8 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.EastSlavic;
-import com.android.inputmethod.keyboard.layout.EastSlavic.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -37,7 +37,7 @@ public final class TestsKazakh extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class KazakhCustomizer extends EastSlavicCustomizer {
- public KazakhCustomizer(final Locale locale) { super(locale); }
+ KazakhCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKhmerKH.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKhmerKH.java
index df2f40d86..dde9b87f6 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKhmerKH.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKhmerKH.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Khmer;
-import com.android.inputmethod.keyboard.layout.Khmer.KhmerCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsKhmerKH extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("km", "KH");
- private static final LayoutBase LAYOUT = new Khmer(new KhmerCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Khmer(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java
index 9797b4ba9..3faf2f6be 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java
@@ -19,8 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.EastSlavic;
-import com.android.inputmethod.keyboard.layout.EastSlavic.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -37,7 +37,7 @@ public final class TestsKyrgyz extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class KyrgyzCustomizer extends EastSlavicCustomizer {
- public KyrgyzCustomizer(final Locale locale) { super(locale); }
+ KyrgyzCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLaoLA.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLaoLA.java
index 34ad1fb7f..ffa337285 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLaoLA.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLaoLA.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Lao;
-import com.android.inputmethod.keyboard.layout.Lao.LaoCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsLaoLA extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("lo", "LA");
- private static final LayoutBase LAYOUT = new Lao(new LaoCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Lao(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java
index dc1736c6d..dbab16a12 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsLatvian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class LatvianCustomizer extends LayoutCustomizer {
- public LatvianCustomizer(final Locale locale) { super(locale); }
+ LatvianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java
index 55ac37a37..248014a0d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsLithuanian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class LithuanianCustomizer extends LayoutCustomizer {
- public LithuanianCustomizer(final Locale locale) { super(locale); }
+ LithuanianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java
index 1d7d85650..46b1c39d5 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java
@@ -20,8 +20,8 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.SouthSlavic;
-import com.android.inputmethod.keyboard.layout.SouthSlavic.SouthSlavicLayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.SouthSlavicLayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsMacedonian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class MacedonianCustomizer extends SouthSlavicLayoutCustomizer {
- public MacedonianCustomizer(final Locale locale) { super(locale); }
+ MacedonianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayMY.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayMY.java
index 9792af9d0..a6e6cd50c 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayMY.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayMY.java
@@ -19,8 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java
index b494ad37b..e3fcb5332 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Malayalam;
-import com.android.inputmethod.keyboard.layout.Malayalam.MalayalamCustomizer;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsMalayalamIN extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("ml", "IN");
- private static final LayoutBase LAYOUT = new Malayalam(new MalayalamCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Malayalam(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMarathiIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMarathiIN.java
index b937629b0..3e54f6e3d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMarathiIN.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMarathiIN.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Marathi;
-import com.android.inputmethod.keyboard.layout.Marathi.MarathiCustomizer;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsMarathiIN extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("mr", "IN");
- private static final LayoutBase LAYOUT = new Marathi(new MarathiCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Marathi(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMongolianMN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMongolianMN.java
index e28e962f9..6dafe7789 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMongolianMN.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMongolianMN.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Mongolian;
-import com.android.inputmethod.keyboard.layout.Mongolian.MongolianMNCustomizer;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsMongolianMN extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("mn", "MN");
- private static final LayoutBase LAYOUT = new Mongolian(new MongolianMNCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Mongolian(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMyanmarMM.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMyanmarMM.java
index e6d3b3b92..b581e4a12 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMyanmarMM.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMyanmarMM.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Myanmar;
-import com.android.inputmethod.keyboard.layout.Myanmar.MyanmarCustomizer;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsMyanmarMM extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("my", "MM");
- private static final LayoutBase LAYOUT = new Myanmar(new MyanmarCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Myanmar(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliRomanized.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliRomanized.java
index 971976aec..f646db379 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliRomanized.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliRomanized.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.NepaliRomanized;
-import com.android.inputmethod.keyboard.layout.NepaliRomanized.NepaliRomanizedCustomizer;
import java.util.Locale;
@@ -30,8 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsNepaliRomanized extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("ne", "NP");
- private static final LayoutBase LAYOUT = new NepaliRomanized(
- new NepaliRomanizedCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new NepaliRomanized(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliTraditional.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliTraditional.java
index 724c4304f..99d87b143 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliTraditional.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliTraditional.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.NepaliTraditional;
-import com.android.inputmethod.keyboard.layout.NepaliTraditional.NepaliTraditionalCustomizer;
import java.util.Locale;
@@ -30,8 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsNepaliTraditional extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("ne", "NP");
- private static final LayoutBase LAYOUT = new NepaliTraditional(
- new NepaliTraditionalCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new NepaliTraditional(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java
index 3ed63153a..149d520c7 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.NoLanguageCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java
index 8d627e3b4..979947f2f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java
@@ -20,7 +20,8 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Colemak;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.NoLanguageCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -39,7 +40,7 @@ public final class TestsNoLanguageColemak extends LayoutTestsBase {
private static class NoLanguageColemakCustomizer extends LayoutCustomizer {
private final NoLanguageCustomizer mNoLanguageCustomizer;
- public NoLanguageColemakCustomizer(final Locale locale) {
+ NoLanguageColemakCustomizer(final Locale locale) {
super(locale);
mNoLanguageCustomizer = new NoLanguageCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java
index 9bf47ed42..542319394 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java
@@ -19,8 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Dvorak;
-import com.android.inputmethod.keyboard.layout.Dvorak.DvorakCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.customizer.DvorakCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.NoLanguageCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -39,7 +40,7 @@ public final class TestsNoLanguageDvorak extends LayoutTestsBase {
private static class NoLanguageDvorakCustomizer extends DvorakCustomizer {
private final NoLanguageCustomizer mNoLanguageCustomizer;
- public NoLanguageDvorakCustomizer(final Locale locale) {
+ NoLanguageDvorakCustomizer(final Locale locale) {
super(locale);
mNoLanguageCustomizer = new NoLanguageCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguagePcQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguagePcQwerty.java
index cd8d43ca8..20b587b73 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguagePcQwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguagePcQwerty.java
@@ -20,7 +20,8 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.PcQwerty;
-import com.android.inputmethod.keyboard.layout.PcQwerty.PcQwertyCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.NoLanguageCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.PcQwertyCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -39,7 +40,7 @@ public final class TestsNoLanguagePcQwerty extends LayoutTestsBase {
private static class NoLanguagePcQwertyCustomizer extends PcQwertyCustomizer {
private final NoLanguageCustomizer mNoLanguageCustomizer;
- public NoLanguagePcQwertyCustomizer(final Locale locale) {
+ NoLanguagePcQwertyCustomizer(final Locale locale) {
super(locale);
mNoLanguageCustomizer = new NoLanguageCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java
index 6c1921ab4..910512c98 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.customizer.NorwegianCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java
index a481796ed..689c38e17 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Colemak;
import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.customizer.NorwegianCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -36,9 +37,7 @@ public final class TestsNorwegianColemak extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class NorwegianColemakCustomizer extends NorwegianCustomizer {
- public NorwegianColemakCustomizer(final Locale locale) {
- super(locale);
- }
+ NorwegianColemakCustomizer(final Locale locale) { super(locale); }
@Override
protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPersian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPersian.java
index b7d75c9f0..8ea8075c4 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPersian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPersian.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.Farsi;
-import com.android.inputmethod.keyboard.layout.Farsi.FarsiCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public class TestsPersian extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("fa");
- private static final LayoutBase LAYOUT = new Farsi(new FarsiCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Farsi(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java
index 04f88c3fc..4f1170afe 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsPolish extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class PolishCustomizer extends LayoutCustomizer {
- public PolishCustomizer(final Locale locale) { super(locale); }
+ PolishCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java
index 8a984a765..7fadaac7e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.PortugueseCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java
index e15e811db..5936e8dce 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java
@@ -19,8 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.PortugueseCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -39,7 +40,7 @@ public final class TestsPortuguesePT extends TestsPortugueseBR {
private static class PortuguesePTCustomizer extends PortugueseCustomizer {
private final EuroCustomizer mEuroCustomizer;
- public PortuguesePTCustomizer(final Locale locale) {
+ PortuguesePTCustomizer(final Locale locale) {
super(locale);
mEuroCustomizer = new EuroCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyEmail.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyEmail.java
index f89863279..cc204def8 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyEmail.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyEmail.java
@@ -24,6 +24,7 @@ import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.keyboard.KeyboardLayoutSet;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EnglishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -52,23 +53,21 @@ public class TestsQwertyEmail extends LayoutTestsBase {
}
private static class EnglishEmailCustomizer extends EnglishCustomizer {
- EnglishEmailCustomizer(final Locale locale) {
- super(locale);
- }
+ EnglishEmailCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getEnterKey(final boolean isPhone) {
- return isPhone ? LayoutBase.ENTER_KEY : super.getEnterKey(isPhone);
+ return isPhone ? ENTER_KEY : super.getEnterKey(isPhone);
}
@Override
public ExpectedKey getEmojiKey(final boolean isPhone) {
- return LayoutBase.DOMAIN_KEY;
+ return DOMAIN_KEY;
}
@Override
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
- return joinKeys(key("@", LayoutBase.SETTINGS_KEY));
+ return joinKeys(key("@", SETTINGS_KEY));
}
}
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyUrl.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyUrl.java
index 0b69c7bc2..acd09d25a 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyUrl.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyUrl.java
@@ -24,6 +24,7 @@ import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.keyboard.KeyboardLayoutSet;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EnglishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -52,23 +53,21 @@ public class TestsQwertyUrl extends LayoutTestsBase {
}
private static class EnglishUrlCustomizer extends EnglishCustomizer {
- EnglishUrlCustomizer(final Locale locale) {
- super(locale);
- }
+ EnglishUrlCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getEnterKey(final boolean isPhone) {
- return isPhone ? LayoutBase.ENTER_KEY : super.getEnterKey(isPhone);
+ return isPhone ? ENTER_KEY : super.getEnterKey(isPhone);
}
@Override
public ExpectedKey getEmojiKey(final boolean isPhone) {
- return LayoutBase.DOMAIN_KEY;
+ return DOMAIN_KEY;
}
@Override
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
- return joinKeys(key("/", LayoutBase.SETTINGS_KEY));
+ return joinKeys(key("/", SETTINGS_KEY));
}
}
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java
index d7b858ea5..af4fbca84 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsRomanian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class RomanianCustomizer extends LayoutCustomizer {
- public RomanianCustomizer(final Locale locale) { super(locale); }
+ RomanianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java
index 9919207ed..75ef48154 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.EastSlavic;
-import com.android.inputmethod.keyboard.layout.EastSlavic.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsRussian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class RussianCustomizer extends EastSlavicCustomizer {
- public RussianCustomizer(final Locale locale) { super(locale); }
+ RussianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java
index 41f1690f3..9495706b2 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java
@@ -20,8 +20,8 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.SouthSlavic;
-import com.android.inputmethod.keyboard.layout.SouthSlavic.SouthSlavicLayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.SouthSlavicLayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsSerbian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class SerbianCustomizer extends SouthSlavicLayoutCustomizer {
- public SerbianCustomizer(final Locale locale) { super(locale); }
+ SerbianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java
index 70f4bcefd..7490d30ab 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.SerbianQwertz;
+import com.android.inputmethod.keyboard.layout.customizer.SerbianLatinCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java
index d8ef51b45..6d9351c9d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.SerbianLatinCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -37,14 +38,12 @@ public final class TestsSerbianLatinQwerty extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class SerbianLatinQwertyCustomizer extends SerbianLatinCustomizer {
- public SerbianLatinQwertyCustomizer(final Locale locale) {
- super(locale);
- }
+ SerbianLatinQwertyCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
return isPhone ? EMPTY_KEYS
- : joinKeys(LayoutBase.EXCLAMATION_AND_QUESTION_MARKS, LayoutBase.SHIFT_KEY);
+ : joinKeys(EXCLAMATION_AND_QUESTION_MARKS, SHIFT_KEY);
}
@Override
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSinhalaLK.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSinhalaLK.java
index 8b861359b..c55c17c53 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSinhalaLK.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSinhalaLK.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.Suppress;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Sinhala;
-import com.android.inputmethod.keyboard.layout.Sinhala.SinhalaCustomizer;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@Suppress
public final class TestsSinhalaLK extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("si", "LK");
- private static final LayoutBase LAYOUT = new Sinhala(new SinhalaCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Sinhala(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java
index bdaf0cad1..c94471644 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsSlovak extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class SlovakCustomizer extends EuroCustomizer {
- public SlovakCustomizer(final Locale locale) { super(locale); }
+ SlovakCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java
index cdb1beeba..e49a27b94 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java
@@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -39,7 +39,7 @@ public final class TestsSlovenian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class SlovenianCustomizer extends EuroCustomizer {
- public SlovenianCustomizer(final Locale locale) { super(locale); }
+ SlovenianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java
index 12e8676ae..6c8693199 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java
@@ -19,8 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Spanish;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.SpanishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -39,7 +40,7 @@ public class TestsSpanish extends LayoutTestsBase {
private static class SpanishESCustomizer extends SpanishCustomizer {
private final EuroCustomizer mEuroCustomizer;
- public SpanishESCustomizer(final Locale locale) {
+ SpanishESCustomizer(final Locale locale) {
super(locale);
mEuroCustomizer = new EuroCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java
index 75aad136f..828f4c4bc 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Spanish;
+import com.android.inputmethod.keyboard.layout.customizer.SpanishCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java
index c3ac0a0c0..b5bfbe47f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Spanish;
+import com.android.inputmethod.keyboard.layout.customizer.SpanishCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java
index b3340aace..c401d3d36 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java
@@ -23,6 +23,7 @@ import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.keyboard.KeyboardLayoutSet;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EnglishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -47,18 +48,14 @@ public class TestsSplitLayoutQwertyEnglishUS extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class EnglishSplitCustomizer extends EnglishCustomizer {
- EnglishSplitCustomizer(Locale locale) {
- super(locale);
- }
+ EnglishSplitCustomizer(Locale locale) { super(locale); }
@Override
public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
if (isPhone) {
return super.getSpaceKeys(isPhone);
- } else {
- return LayoutBase.joinKeys(
- LayoutBase.LANGUAGE_SWITCH_KEY, LayoutBase.SPACE_KEY, LayoutBase.SPACE_KEY);
}
+ return joinKeys(LANGUAGE_SWITCH_KEY, SPACE_KEY, SPACE_KEY);
}
}
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java
index 13b974194..a8ab966ac 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java
@@ -19,8 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -37,7 +37,7 @@ public final class TestsSwahili extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class SwahiliCustomizer extends LayoutCustomizer {
- public SwahiliCustomizer(final Locale locale) { super(locale); }
+ SwahiliCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java
index 79cb3dcc7..061001d49 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.customizer.SwedishCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java
index ed74d6d74..dc3d83134 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java
@@ -19,9 +19,10 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.PcQwerty;
-import com.android.inputmethod.keyboard.layout.PcQwerty.PcQwertyCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.PcQwertyCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.SwedishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -41,7 +42,7 @@ public final class TestsSwedishPcQwerty extends LayoutTestsBase {
private static class SwedishPcQwertyCustomizer extends SwedishCustomizer {
private final LayoutCustomizer mPcQwertyCustomizer;
- public SwedishPcQwertyCustomizer(final Locale locale) {
+ SwedishPcQwertyCustomizer(final Locale locale) {
super(locale);
mPcQwertyCustomizer = new PcQwertyCustomizer(locale);
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java
index 38d5364e5..ecef2d79e 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Spanish;
+import com.android.inputmethod.keyboard.layout.customizer.SpanishCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -36,15 +37,11 @@ public class TestsTagalog extends TestsSpanish {
LayoutBase getLayout() { return LAYOUT; }
private static class TagalogCustomizer extends SpanishCustomizer {
-
- public TagalogCustomizer(final Locale locale) {
- super(locale);
- }
+ TagalogCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
- return isPhone ? LayoutBase.PHONE_PUNCTUATION_MORE_KEYS
- : LayoutBase.TABLET_PUNCTUATION_MORE_KEYS;
+ return isPhone ? PHONE_PUNCTUATION_MORE_KEYS : TABLET_PUNCTUATION_MORE_KEYS;
}
}
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilIN.java
index 31df53c0b..3297d399f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilIN.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilIN.java
@@ -22,7 +22,7 @@ import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted;
import com.android.inputmethod.keyboard.layout.Tamil;
-import com.android.inputmethod.keyboard.layout.Tamil.TamilCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.TamilCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -39,7 +39,7 @@ public final class TestsTamilIN extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class TamilINCustomizer extends TamilCustomizer {
- public TamilINCustomizer(final Locale locale) { super(locale); }
+ TamilINCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilLK.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilLK.java
index 65ec0b036..72872ba66 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilLK.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilLK.java
@@ -22,7 +22,7 @@ import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted;
import com.android.inputmethod.keyboard.layout.Tamil;
-import com.android.inputmethod.keyboard.layout.Tamil.TamilCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.TamilCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import java.util.Locale;
@@ -39,7 +39,7 @@ public final class TestsTamilLK extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class TamilLKCustomizer extends TamilCustomizer {
- public TamilLKCustomizer(final Locale locale) { super(locale); }
+ TamilLKCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilSG.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilSG.java
index ade7abaf9..a7a041b61 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilSG.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilSG.java
@@ -20,7 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Tamil;
-import com.android.inputmethod.keyboard.layout.Tamil.TamilCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.TamilCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTeluguIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTeluguIN.java
index 04996d9aa..2b202a91d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTeluguIN.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTeluguIN.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Telugu;
-import com.android.inputmethod.keyboard.layout.Telugu.TeluguCustomizer;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsTeluguIN extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("te", "IN");
- private static final LayoutBase LAYOUT = new Telugu(new TeluguCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Telugu(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsThai.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsThai.java
index 3c8727290..2c1a29efc 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsThai.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsThai.java
@@ -20,7 +20,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Thai;
-import com.android.inputmethod.keyboard.layout.Thai.ThaiCustomizer;
import java.util.Locale;
@@ -30,7 +29,7 @@ import java.util.Locale;
@SmallTest
public final class TestsThai extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("th");
- private static final LayoutBase LAYOUT = new Thai(new ThaiCustomizer(LOCALE));
+ private static final LayoutBase LAYOUT = new Thai(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java
index bf427cdb0..95f86e461 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java
@@ -19,8 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.customizer.TurkicCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -39,7 +40,7 @@ public final class TestsTurkish extends LayoutTestsBase {
private static class TurkishCustomizer extends EuroCustomizer {
private final TurkicCustomizer mTurkicCustomizer;
- public TurkishCustomizer(final Locale locale) {
+ TurkishCustomizer(final Locale locale) {
super(locale);
mTurkicCustomizer = new TurkicCustomizer(locale);
}
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 a6bcacc9e..da93d6c3b 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java
@@ -19,10 +19,10 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.EastSlavic;
-import com.android.inputmethod.keyboard.layout.EastSlavic.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted;
+import com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -40,7 +40,7 @@ public final class TestsUkrainian extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class UkrainianCustomizer extends EastSlavicCustomizer {
- public UkrainianCustomizer(final Locale locale) { super(locale); }
+ UkrainianCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_HRYVNIA; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java
index e8801dd58..fd12a6a82 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Uzbek;
+import com.android.inputmethod.keyboard.layout.customizer.UzbekCustomizer;
import java.util.Locale;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java
index dec587f85..4c33a8cc1 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.UzbekCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
@@ -36,9 +37,7 @@ public final class TestsUzbekQwerty extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class UzbekQwertyCustomizer extends UzbekCustomizer {
- public UzbekQwertyCustomizer(final Locale locale) {
- super(locale);
- }
+ UzbekQwertyCustomizer(final Locale locale) { super(locale); }
@Override
protected void setUzbekKeys(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 83d86ac4d..356b04296 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java
@@ -19,10 +19,10 @@ package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.Qwerty;
import com.android.inputmethod.keyboard.layout.Symbols;
import com.android.inputmethod.keyboard.layout.SymbolsShifted;
+import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
@@ -40,9 +40,7 @@ public final class TestsVietnamese extends LayoutTestsBase {
LayoutBase getLayout() { return LAYOUT; }
private static class VietnameseCustomizer extends LayoutCustomizer {
- public VietnameseCustomizer(final Locale locale) {
- super(locale);
- }
+ VietnameseCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_DONG; }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java
index e048e92c2..abf3cad9c 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java
@@ -20,6 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.customizer.EnglishCustomizer;
import java.util.Locale;