diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2011-06-23 21:55:56 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2011-06-24 00:08:42 +0900 |
| commit | cd96a691b14b384face577d907f6c1aa33b47233 (patch) | |
| tree | bcf1f2646570a78150311dad3bd97fdf35624bd0 /java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java | |
| parent | 75d7fb66751cb39e7e4f17ad88b3190206e8aaac (diff) | |
Fix "Show settings key" option on 7" device
Cherry-pic I993ac772 from Honeycomb-MR2.
Bug: 4586882
Change-Id: Ie74138523a3ae7958c7bec674c49aa0ab1a72d05
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java index d5b364818..76c841014 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java @@ -487,8 +487,12 @@ public class KeyboardParser { R.styleable.Keyboard_Case_navigateAction, id.mNavigateAction); final boolean passwordInputMatched = matchBoolean(a, R.styleable.Keyboard_Case_passwordInput, id.mPasswordInput); - final boolean settingsKeyMatched = matchBoolean(a, + final boolean hasSettingsKeyMatched = matchBoolean(a, R.styleable.Keyboard_Case_hasSettingsKey, id.mHasSettingsKey); + final boolean f2KeyModeMatched = matchInteger(a, + R.styleable.Keyboard_Case_f2KeyMode, id.mF2KeyMode); + final boolean clobberSettingsKeyMatched = matchBoolean(a, + R.styleable.Keyboard_Case_clobberSettingsKey, id.mClobberSettingsKey); final boolean voiceEnabledMatched = matchBoolean(a, R.styleable.Keyboard_Case_voiceKeyEnabled, id.mVoiceKeyEnabled); final boolean voiceKeyMatched = matchBoolean(a, @@ -506,15 +510,19 @@ public class KeyboardParser { final boolean countryCodeMatched = matchString(a, R.styleable.Keyboard_Case_countryCode, id.mLocale.getCountry()); final boolean selected = modeMatched && navigateActionMatched && passwordInputMatched - && settingsKeyMatched && voiceEnabledMatched && voiceKeyMatched - && imeActionMatched && localeCodeMatched && languageCodeMatched - && countryCodeMatched; + && hasSettingsKeyMatched && f2KeyModeMatched && clobberSettingsKeyMatched + && voiceEnabledMatched && voiceKeyMatched && imeActionMatched && + localeCodeMatched && languageCodeMatched && countryCodeMatched; - if (DEBUG) Log.d(TAG, String.format("<%s%s%s%s%s%s%s%s%s%s%s> %s", TAG_CASE, + if (DEBUG) Log.d(TAG, String.format("<%s%s%s%s%s%s%s%s%s%s%s%s%s> %s", TAG_CASE, textAttr(a.getString(R.styleable.Keyboard_Case_mode), "mode"), booleanAttr(a, R.styleable.Keyboard_Case_navigateAction, "navigateAction"), booleanAttr(a, R.styleable.Keyboard_Case_passwordInput, "passwordInput"), booleanAttr(a, R.styleable.Keyboard_Case_hasSettingsKey, "hasSettingsKey"), + textAttr(KeyboardId.f2KeyModeName( + a.getInt(R.styleable.Keyboard_Case_f2KeyMode, -1)), "f2KeyMode"), + booleanAttr(a, R.styleable.Keyboard_Case_clobberSettingsKey, + "clobberSettingsKey"), booleanAttr(a, R.styleable.Keyboard_Case_voiceKeyEnabled, "voiceKeyEnabled"), booleanAttr(a, R.styleable.Keyboard_Case_hasVoiceKey, "hasVoiceKey"), textAttr(EditorInfoCompatUtils.imeOptionsName( |
