Remove voice key from keyboard layout
Bug: 14419121 Change-Id: I71031f1ed9735a5a05dc584299b56512fb0b6866main
parent
de3afcfdcc
commit
722f5c7966
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
** Copyright 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.
|
||||
|
@ -23,29 +23,12 @@
|
|||
>
|
||||
<switch>
|
||||
<case
|
||||
latin:supportsSwitchingToShortcutIme="true"
|
||||
latin:clobberSettingsKey="false"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="shortcutKeyStyle"
|
||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||
latin:moreKeys="!text/keyspec_settings" />
|
||||
</case>
|
||||
<case
|
||||
latin:supportsSwitchingToShortcutIme="true"
|
||||
latin:clobberSettingsKey="true"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="shortcutKeyStyle" />
|
||||
</case>
|
||||
<case
|
||||
latin:supportsSwitchingToShortcutIme="false"
|
||||
latin:clobberSettingsKey="false"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="settingsKeyStyle" />
|
||||
</case>
|
||||
<!-- supportsSwitchingToShortcutIme="false" clobberSettingsKey="true" -->
|
||||
<!-- clobberSettingsKey="true" -->
|
||||
<default>
|
||||
<Spacer />
|
||||
</default>
|
|
@ -29,7 +29,7 @@
|
|||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyWidth="10.0%p" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/key_shortcut" />
|
||||
latin:keyboardLayout="@xml/key_settings" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/key_f1" />
|
||||
<include
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
>
|
||||
<include
|
||||
latin:keyWidth="9.0%p"
|
||||
latin:keyboardLayout="@xml/key_shortcut" />
|
||||
latin:keyboardLayout="@xml/key_settings" />
|
||||
<switch>
|
||||
<case
|
||||
latin:languageSwitchKeyEnabled="true"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyWidth="10.0%p" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/key_shortcut" />
|
||||
latin:keyboardLayout="@xml/key_settings" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/key_f1" />
|
||||
<include
|
||||
|
|
|
@ -36,27 +36,10 @@
|
|||
latin:keySpec="\@"
|
||||
latin:keyStyle="f1MoreKeysStyle" />
|
||||
</case>
|
||||
<case
|
||||
latin:supportsSwitchingToShortcutIme="false"
|
||||
>
|
||||
<Key
|
||||
latin:keySpec="!text/keyspec_comma"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:keyStyle="f1MoreKeysStyle" />
|
||||
</case>
|
||||
<!-- latin:supportsSwitchingToShortcutIme="true" -->
|
||||
<case
|
||||
latin:hasShortcutKey="true"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="shortcutKeyStyle" />
|
||||
</case>
|
||||
<!-- latin:hasShortcutKey="false" -->
|
||||
<default>
|
||||
<Key
|
||||
latin:keySpec="!text/keyspec_comma"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:additionalMoreKeys="!text/keyspec_shortcut"
|
||||
latin:keyStyle="f1MoreKeysStyle" />
|
||||
</default>
|
||||
</switch>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<Key
|
||||
latin:keySpec="q"
|
||||
latin:backgroundType="normal"
|
||||
latin:additionalMoreKeys="!text/keyspec_shortcut"
|
||||
latin:keyStyle="f1MoreKeysStyle" />
|
||||
<include
|
||||
latin:keyXPos="25%p"
|
||||
|
|
|
@ -25,13 +25,6 @@
|
|||
latin:keyWidth="7.692%p"
|
||||
>
|
||||
<switch>
|
||||
<case
|
||||
latin:hasShortcutKey="true"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="shortcutKeyStyle"
|
||||
latin:keyWidth="11.538%p" />
|
||||
</case>
|
||||
<case
|
||||
latin:clobberSettingsKey="false"
|
||||
>
|
||||
|
|
|
@ -68,6 +68,15 @@ public final class Arabic extends LayoutBase {
|
|||
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
|
||||
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
|
||||
if (isPhone) {
|
||||
|
|
|
@ -121,8 +121,7 @@ public final class ArmenianPhonetic extends LayoutBase {
|
|||
} else {
|
||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||
.addKeysOnTheLeftOfRow(5,
|
||||
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||
}
|
||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||
|
|
|
@ -51,7 +51,7 @@ public final class Dvorak extends LayoutBase {
|
|||
|
||||
@Override
|
||||
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
||||
return isPhone ? joinKeys(key("q", SHORTCUT_KEY, SETTINGS_KEY)) : joinKeys(key("/"));
|
||||
return isPhone ? joinKeys(key("q", SETTINGS_KEY)) : joinKeys(key("/"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -66,6 +66,15 @@ public final class Farsi extends LayoutBase {
|
|||
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
|
||||
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
|
||||
if (isPhone) {
|
||||
|
|
|
@ -94,8 +94,7 @@ public final class Khmer extends LayoutBase {
|
|||
} else {
|
||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||
.addKeysOnTheLeftOfRow(5,
|
||||
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||
}
|
||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||
|
|
|
@ -98,8 +98,7 @@ public final class Lao extends LayoutBase {
|
|||
} else {
|
||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||
.addKeysOnTheLeftOfRow(5,
|
||||
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||
}
|
||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||
|
|
|
@ -29,7 +29,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.
|
||||
*/
|
||||
|
@ -161,7 +160,8 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
|||
* @return the array of {@link ExpectedKey} that should be placed at left of the spacebar.
|
||||
*/
|
||||
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
||||
return isPhone ? joinKeys(key(SHORTCUT_KEY, SETTINGS_KEY)) : joinKeys("/");
|
||||
// U+002C: "," COMMA
|
||||
return isPhone ? joinKeys(key("\u002C", SETTINGS_KEY)) : joinKeys("/");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -296,8 +296,7 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
|||
} else {
|
||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||
.addKeysOnTheRightOfRow(2, ENTER_KEY)
|
||||
.addKeysOnTheLeftOfRow(4,
|
||||
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||
.addKeysOnTheLeftOfRow(4, customizer.getSymbolsKey(), SETTINGS_KEY)
|
||||
.addKeysOnTheRightOfRow(4, EMOJI_KEY);
|
||||
}
|
||||
builder.addKeysOnTheLeftOfRow(3, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||
|
@ -307,6 +306,10 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
|||
|
||||
/**
|
||||
* Get common alphabet layout. This layout doesn't contain any special keys.
|
||||
*
|
||||
* A keyboard layout is an array of rows, and a row consists of an array of
|
||||
* {@link ExpectedKey}s. Each row may have different number of {@link ExpectedKey}s.
|
||||
*
|
||||
* @param isPhone true if requesting phone's layout.
|
||||
* @return the common alphabet keyboard layout.
|
||||
*/
|
||||
|
@ -314,6 +317,10 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
|||
|
||||
/**
|
||||
* Get common alphabet shifted layout. This layout doesn't contain any special keys.
|
||||
*
|
||||
* A keyboard layout is an array of rows, and a row consists of an array of
|
||||
* {@link ExpectedKey}s. Each row may have different number of {@link ExpectedKey}s.
|
||||
*
|
||||
* @param isPhone true if requesting phone's layout.
|
||||
* @param elementId the element id of the requesting shifted mode.
|
||||
* @return the common alphabet shifted keyboard layout.
|
||||
|
@ -328,6 +335,10 @@ public abstract class LayoutBase extends AbstractLayoutBase {
|
|||
|
||||
/**
|
||||
* Get the complete expected keyboard layout.
|
||||
*
|
||||
* A keyboard layout is an array of rows, and a row consists of an array of
|
||||
* {@link ExpectedKey}s. Each row may have different number of {@link ExpectedKey}s.
|
||||
*
|
||||
* @param isPhone true if requesting phone's layout.
|
||||
* @param elementId the element id of the requesting keyboard mode.
|
||||
* @return the keyboard layout of the <code>elementId</code>.
|
||||
|
|
|
@ -106,8 +106,7 @@ public final class Myanmar extends LayoutBase {
|
|||
} else {
|
||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||
.addKeysOnTheLeftOfRow(5,
|
||||
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||
}
|
||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||
|
|
|
@ -50,7 +50,7 @@ public final class PcQwerty extends LayoutBase {
|
|||
|
||||
@Override
|
||||
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
|
||||
return joinKeys(key(SHORTCUT_KEY, SETTINGS_KEY));
|
||||
return joinKeys(SETTINGS_KEY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -111,8 +111,7 @@ public final class Thai extends LayoutBase {
|
|||
} else {
|
||||
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
|
||||
.addKeysOnTheRightOfRow(3, ENTER_KEY)
|
||||
.addKeysOnTheLeftOfRow(5,
|
||||
customizer.getSymbolsKey(), key(SHORTCUT_KEY, SETTINGS_KEY))
|
||||
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
|
||||
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
|
||||
}
|
||||
builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
|
||||
|
|
|
@ -51,7 +51,7 @@ abstract class LayoutTestsBase extends KeyboardLayoutSetTestsBase {
|
|||
mSubtype = getSubtype(mLayout.getLocale(), mLayout.getName());
|
||||
mLogTag = SubtypeLocaleUtils.getSubtypeNameForLogging(mSubtype) + "/"
|
||||
+ (isPhone() ? "phone" : "tablet");
|
||||
// TODO: Test with voice and language switch keys enabled and disabled.
|
||||
// TODO: Test with language switch key enabled and disabled.
|
||||
mKeyboardLayoutSet = createKeyboardLayoutSet(mSubtype, null /* editorInfo */,
|
||||
true /* isShortcutImeEnabled */, true /* showsVoiceInputKey */,
|
||||
true /* isLanguageSwitchKeyEnabled */);
|
||||
|
|
Loading…
Reference in New Issue