am 139773d0: Enable voice and language switch keys for keyboard layout tests
* commit '139773d0167a2cf09c4b6c2c47aa7d980dc413bd': Enable voice and language switch keys for keyboard layout testsmain
commit
d0d4a5d532
|
@ -68,15 +68,6 @@ public final class Arabic extends LayoutBase {
|
||||||
return EMPTY_KEYS;
|
return EMPTY_KEYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
|
||||||
if (isPhone) {
|
|
||||||
// U+060C: "،" ARABIC COMMA
|
|
||||||
return joinKeys(key("\u060C", SETTINGS_KEY));
|
|
||||||
}
|
|
||||||
return super.getKeysLeftToSpacebar(isPhone);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
|
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
|
||||||
if (isPhone) {
|
if (isPhone) {
|
||||||
|
|
|
@ -121,7 +121,8 @@ public final class ArmenianPhonetic extends LayoutBase {
|
||||||
} else {
|
} else {
|
||||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
.addKeysOnTheLeftOfRow(5,
|
||||||
|
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||||
}
|
}
|
||||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||||
|
|
|
@ -66,15 +66,6 @@ public final class Farsi extends LayoutBase {
|
||||||
return EMPTY_KEYS;
|
return EMPTY_KEYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
|
||||||
if (isPhone) {
|
|
||||||
// U+060C: "،" ARABIC COMMA
|
|
||||||
return joinKeys(key("\u060C", SETTINGS_KEY));
|
|
||||||
}
|
|
||||||
return super.getKeysLeftToSpacebar(isPhone);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
|
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
|
||||||
if (isPhone) {
|
if (isPhone) {
|
||||||
|
@ -91,7 +82,7 @@ public final class Farsi extends LayoutBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
|
public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
|
||||||
return joinKeys(SPACE_KEY, key(ZWNJ_KEY, ZWJ_KEY));
|
return joinKeys(LANGUAGE_SWITCH_KEY, SPACE_KEY, key(ZWNJ_KEY, ZWJ_KEY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -94,7 +94,8 @@ public final class Khmer extends LayoutBase {
|
||||||
} else {
|
} else {
|
||||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
.addKeysOnTheLeftOfRow(5,
|
||||||
|
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||||
}
|
}
|
||||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||||
|
|
|
@ -98,7 +98,8 @@ public final class Lao extends LayoutBase {
|
||||||
} else {
|
} else {
|
||||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
.addKeysOnTheLeftOfRow(5,
|
||||||
|
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||||
}
|
}
|
||||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||||
|
|
|
@ -152,7 +152,7 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
||||||
* keyboard.
|
* keyboard.
|
||||||
*/
|
*/
|
||||||
public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
|
public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
|
||||||
return joinKeys(SPACE_KEY);
|
return joinKeys(LANGUAGE_SWITCH_KEY, SPACE_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -161,7 +161,7 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
||||||
* @return the array of {@link ExpectedKey} that should be placed at left of the spacebar.
|
* @return the array of {@link ExpectedKey} that should be placed at left of the spacebar.
|
||||||
*/
|
*/
|
||||||
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
||||||
return isPhone ? joinKeys(key(",", SETTINGS_KEY)) : joinKeys("/");
|
return isPhone ? joinKeys(key(SHORTCUT_KEY, SETTINGS_KEY)) : joinKeys("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -296,7 +296,8 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
||||||
} else {
|
} else {
|
||||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||||
.addKeysOnTheRightOfRow(2, ENTER_KEY)
|
.addKeysOnTheRightOfRow(2, ENTER_KEY)
|
||||||
.addKeysOnTheLeftOfRow(4, customizer.getSymbolsKey(), SETTINGS_KEY)
|
.addKeysOnTheLeftOfRow(4,
|
||||||
|
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||||
.addKeysOnTheRightOfRow(4, EMOJI_KEY);
|
.addKeysOnTheRightOfRow(4, EMOJI_KEY);
|
||||||
}
|
}
|
||||||
builder.addKeysOnTheLeftOfRow(3, (Object[])customizer.getLeftShiftKeys(isPhone))
|
builder.addKeysOnTheLeftOfRow(3, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||||
|
|
|
@ -106,7 +106,8 @@ public final class Myanmar extends LayoutBase {
|
||||||
} else {
|
} else {
|
||||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
.addKeysOnTheLeftOfRow(5,
|
||||||
|
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||||
}
|
}
|
||||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||||
|
|
|
@ -47,7 +47,7 @@ public final class NepaliRomanized extends LayoutBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
|
public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
|
||||||
return joinKeys(SPACE_KEY, key(ZWNJ_KEY, ZWJ_KEY));
|
return joinKeys(LANGUAGE_SWITCH_KEY, SPACE_KEY, key(ZWNJ_KEY, ZWJ_KEY));
|
||||||
}
|
}
|
||||||
|
|
||||||
// U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN
|
// U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN
|
||||||
|
|
|
@ -50,7 +50,7 @@ public final class PcQwerty extends LayoutBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
||||||
return joinKeys(SETTINGS_KEY);
|
return joinKeys(key(SHORTCUT_KEY, SETTINGS_KEY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -111,7 +111,8 @@ public final class Thai extends LayoutBase {
|
||||||
} else {
|
} else {
|
||||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
.addKeysOnTheLeftOfRow(5,
|
||||||
|
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||||
}
|
}
|
||||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||||
|
|
|
@ -51,7 +51,10 @@ abstract class LayoutTestsBase extends KeyboardLayoutSetTestsBase {
|
||||||
mSubtype = getSubtype(mLayout.getLocale(), mLayout.getName());
|
mSubtype = getSubtype(mLayout.getLocale(), mLayout.getName());
|
||||||
mLogTag = SubtypeLocaleUtils.getSubtypeNameForLogging(mSubtype) + "/"
|
mLogTag = SubtypeLocaleUtils.getSubtypeNameForLogging(mSubtype) + "/"
|
||||||
+ (isPhone() ? "phone" : "tablet");
|
+ (isPhone() ? "phone" : "tablet");
|
||||||
mKeyboardLayoutSet = createKeyboardLayoutSet(mSubtype, null /* editorInfo */);
|
// TODO: Test with voice and language switch keys enabled and disabled.
|
||||||
|
mKeyboardLayoutSet = createKeyboardLayoutSet(mSubtype, null /* editorInfo */,
|
||||||
|
true /* isShortcutImeEnabled */, true /* showsVoiceInputKey */,
|
||||||
|
true /* isLanguageSwitchKeyEnabled */);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Those helper methods have a lower case name to be readable when defining expected keyboard
|
// Those helper methods have a lower case name to be readable when defining expected keyboard
|
||||||
|
|
Loading…
Reference in New Issue