Remove password field special handling

Change-Id: Iaf1b4bbb54be7a4cade856d1ba363e976774f442
main
Tadashi G. Takaoka 2011-08-23 14:05:39 +09:00
parent 6dde878d51
commit f9da4c548f
10 changed files with 6 additions and 121 deletions

View File

@ -35,7 +35,7 @@
<!-- Label for "switch to more symbol" modifier key. Must be short to fit on key! -->
<string name="label_to_more_symbol_key">= \\ &lt;</string>
<!-- Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! -->
<string name="label_to_more_symbol_for_tablet_key">\\ ^ [ {</string>
<string name="label_to_more_symbol_for_tablet_key">~ \\ {</string>
<!-- Label for "Tab" key. Must be short to fit on key! -->
<string name="label_tab_key">Tab</string>

View File

@ -118,19 +118,4 @@
latin:keyLabelOption="fontNormal|hasPopupHint"
latin:keyOutputText="@string/keylabel_for_popular_domain"
latin:popupCharacters="@string/alternates_for_popular_domain" />
<switch>
<case
latin:passwordInput="true"
>
<key-style
latin:styleName="nonPasswordSymbolKeyStyle"
latin:enabled="false" />
</case>
<!-- latin:passwordInput="false" -->
<default>
<key-style
latin:styleName="nonPasswordSymbolKeyStyle"
latin:enabled="true" />
</default>
</switch>
</merge>

View File

@ -33,28 +33,21 @@
<Key
latin:keyLabel="|" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="•"
latin:popupCharacters="♪,♥,♠,♦,♣" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="√" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="π"
latin:popupCharacters="Π" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="÷" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="×" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="§"
latin:popupCharacters="¶" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="Δ" />
<Key
latin:keyStyle="deleteKeyStyle"
@ -65,27 +58,21 @@
latin:keyWidth="9.0%p"
>
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="£"
latin:keyXPos="4.5%p" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¢" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="€" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¥" />
<Key
latin:keyLabel="^"
latin:popupCharacters="↑,↓,←,→" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="°"
latin:popupCharacters=",″" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="±"
latin:popupCharacters="∞" />
<Key
@ -106,26 +93,20 @@
<Key
latin:keyLabel="\\" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="©" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="®" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="™" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="℅" />
<Key
latin:keyLabel="[" />
<Key
latin:keyLabel="]" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¡" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¿" />
</Row>
<Row

View File

@ -104,19 +104,4 @@
latin:keyLabelOption="fontNormal|hasPopupHint"
latin:keyOutputText="@string/keylabel_for_popular_domain"
latin:popupCharacters="@string/alternates_for_popular_domain" />
<switch>
<case
latin:passwordInput="true"
>
<key-style
latin:styleName="nonPasswordSymbolKeyStyle"
latin:enabled="false" />
</case>
<!-- latin:passwordInput="false" -->
<default>
<key-style
latin:styleName="nonPasswordSymbolKeyStyle"
latin:enabled="true" />
</default>
</switch>
</merge>

View File

@ -37,28 +37,21 @@
<Key
latin:keyLabel="|" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="•"
latin:popupCharacters="♪,♥,♠,♦,♣" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="√" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="π"
latin:popupCharacters="Π" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="÷" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="×" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="§"
latin:popupCharacters="¶" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="Δ" />
<Key
latin:keyStyle="deleteKeyStyle"
@ -73,26 +66,20 @@
latin:keyLabelOption="alignLeft"
latin:keyWidth="11.172%p" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="£" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¢" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="€" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¥" />
<Key
latin:keyLabel="^"
latin:popupCharacters="↑,↓,←,→" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="°"
latin:popupCharacters=",″" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="±"
latin:popupCharacters="∞" />
<Key
@ -113,26 +100,20 @@
<Key
latin:keyLabel="\\" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="©" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="®" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="™" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="℅" />
<Key
latin:keyLabel="[" />
<Key
latin:keyLabel="]" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¡" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¿" />
<Key
latin:keyStyle="backFromMoreSymbolKeyStyle"

View File

@ -215,29 +215,6 @@
latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_symbol_key"
latin:parentStyle="functionalKeyStyle" />
<switch>
<case
latin:passwordInput="true"
>
<key-style
latin:styleName="nonPasswordSymbolKeyStyle"
latin:enabled="false" />
<key-style
latin:styleName="nonPasswordFunctionalKeyStyle"
latin:enabled="false"
latin:parentStyle="functionalKeyStyle" />
</case>
<!-- latin:passwordInput="false" -->
<default>
<key-style
latin:styleName="nonPasswordSymbolKeyStyle"
latin:enabled="true" />
<key-style
latin:styleName="nonPasswordFunctionalKeyStyle"
latin:enabled="true"
latin:parentStyle="functionalKeyStyle" />
</default>
</switch>
<key-style
latin:styleName="punctuationKeyStyle"
latin:keyLabel="."

View File

@ -33,21 +33,16 @@
<Key
latin:keyLabel="|" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="•"
latin:popupCharacters="♪,♥,♠,♦,♣" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="√" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="π"
latin:popupCharacters="Π" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="÷" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="×" />
<Key
latin:keyLabel="{" />
@ -61,16 +56,12 @@
<Key
latin:keyStyle="nonSpecialBackgroundTabKeyStyle" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="£" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¢" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="€" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="°"
latin:popupCharacters=",″" />
<Key
@ -95,16 +86,12 @@
latin:keyWidth="15%p"
latin:visualInsetsRight="1%p" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="™" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="®" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="©" />
<Key
latin:keyStyle="nonPasswordSymbolKeyStyle"
latin:keyLabel="¶"
latin:popupCharacters="§" />
<Key

View File

@ -35,13 +35,13 @@
<Key
latin:keyLabel="„"
latin:popupCharacters="“,”,„,‟,«,»,,,,"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
latin:keyStyle="functionalKeyStyle" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="50%p" />
<Key
latin:keyLabel="…"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
latin:keyStyle="functionalKeyStyle" />
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="fillRight" />
@ -57,14 +57,14 @@
latin:keyLabel="„"
latin:popupCharacters="“,”,„,‟,«,»,,,,"
latin:keyWidth="9.2%p"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
latin:keyStyle="functionalKeyStyle" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<Key
latin:keyLabel="…"
latin:keyWidth="9.2%p"
latin:keyStyle="nonPasswordFunctionalKeyStyle" />
latin:keyStyle="functionalKeyStyle" />
<Key
latin:keyStyle="returnKeyStyle"
latin:keyWidth="fillRight" />

View File

@ -295,12 +295,8 @@ public class Key {
mY = y;
mWidth = keyWidth - mHorizontalGap;
CharSequence[] popupCharacters = style.getTextArray(
final CharSequence[] popupCharacters = style.getTextArray(
keyAttr, R.styleable.Keyboard_Key_popupCharacters);
if (params.mId.mPasswordInput) {
popupCharacters = PopupCharactersParser.filterOut(
res, popupCharacters, PopupCharactersParser.NON_ASCII_FILTER);
}
// In Arabic symbol layouts, we'd like to keep digits in popup characters regardless of
// config_digit_popup_characters_enabled.
if (params.mId.isAlphabetKeyboard() && !res.getBoolean(

View File

@ -196,13 +196,6 @@ public class PopupCharactersParser {
}
};
public static final CodeFilter NON_ASCII_FILTER = new CodeFilter() {
@Override
public boolean shouldFilterOut(int code) {
return code < 0x20 || code > 0x7e;
}
};
public static CharSequence[] filterOut(Resources res, CharSequence[] popupCharacters,
CodeFilter filter) {
if (popupCharacters == null || popupCharacters.length < 1) {