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! --> <!-- Label for "switch to more symbol" modifier key. Must be short to fit on key! -->
<string name="label_to_more_symbol_key">= \\ &lt;</string> <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! --> <!-- 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! --> <!-- Label for "Tab" key. Must be short to fit on key! -->
<string name="label_tab_key">Tab</string> <string name="label_tab_key">Tab</string>

View File

@ -118,19 +118,4 @@
latin:keyLabelOption="fontNormal|hasPopupHint" latin:keyLabelOption="fontNormal|hasPopupHint"
latin:keyOutputText="@string/keylabel_for_popular_domain" latin:keyOutputText="@string/keylabel_for_popular_domain"
latin:popupCharacters="@string/alternates_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> </merge>

View File

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

View File

@ -104,19 +104,4 @@
latin:keyLabelOption="fontNormal|hasPopupHint" latin:keyLabelOption="fontNormal|hasPopupHint"
latin:keyOutputText="@string/keylabel_for_popular_domain" latin:keyOutputText="@string/keylabel_for_popular_domain"
latin:popupCharacters="@string/alternates_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> </merge>

View File

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

View File

@ -215,29 +215,6 @@
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_symbol_key" latin:keyLabel="@string/label_to_symbol_key"
latin:parentStyle="functionalKeyStyle" /> 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 <key-style
latin:styleName="punctuationKeyStyle" latin:styleName="punctuationKeyStyle"
latin:keyLabel="." latin:keyLabel="."

View File

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

View File

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

View File

@ -295,12 +295,8 @@ public class Key {
mY = y; mY = y;
mWidth = keyWidth - mHorizontalGap; mWidth = keyWidth - mHorizontalGap;
CharSequence[] popupCharacters = style.getTextArray( final CharSequence[] popupCharacters = style.getTextArray(
keyAttr, R.styleable.Keyboard_Key_popupCharacters); 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 // In Arabic symbol layouts, we'd like to keep digits in popup characters regardless of
// config_digit_popup_characters_enabled. // config_digit_popup_characters_enabled.
if (params.mId.isAlphabetKeyboard() && !res.getBoolean( 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, public static CharSequence[] filterOut(Resources res, CharSequence[] popupCharacters,
CodeFilter filter) { CodeFilter filter) {
if (popupCharacters == null || popupCharacters.length < 1) { if (popupCharacters == null || popupCharacters.length < 1) {