diff options
author | 2012-01-25 13:14:59 +0900 | |
---|---|---|
committer | 2012-01-25 19:09:18 +0900 | |
commit | 83306b914f36871f785677ca13e1ce8033774b79 (patch) | |
tree | ae4fdaf492ed3716fbab71c25d31f24629d3bb45 /java/src | |
parent | 117c124c13f0e6af737b1858bd5c4d9e6e7eb353 (diff) | |
download | latinime-83306b914f36871f785677ca13e1ce8033774b79.tar.gz latinime-83306b914f36871f785677ca13e1ce8033774b79.tar.xz latinime-83306b914f36871f785677ca13e1ce8033774b79.zip |
Add element predicator to <switch><case> condition of Keyboard
Change-Id: I8f9eb8eb28707d23e421e88f979022d844a3b3ee
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/Keyboard.java | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java index c548f1145..a09232bf8 100644 --- a/java/src/com/android/inputmethod/keyboard/Keyboard.java +++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java @@ -1034,6 +1034,9 @@ public class Keyboard { final TypedArray a = mResources.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.Keyboard_Case); try { + final boolean keyboardSetElementMatched = matchTypedValue(a, + R.styleable.Keyboard_Case_keyboardSetElement, id.mElementId, + KeyboardId.elementIdToName(id.mElementId)); final boolean modeMatched = matchTypedValue(a, R.styleable.Keyboard_Case_mode, id.mMode, KeyboardId.modeName(id.mMode)); final boolean navigateActionMatched = matchBoolean(a, @@ -1062,13 +1065,15 @@ public class Keyboard { R.styleable.Keyboard_Case_languageCode, id.mLocale.getLanguage()); final boolean countryCodeMatched = matchString(a, R.styleable.Keyboard_Case_countryCode, id.mLocale.getCountry()); - final boolean selected = modeMatched && navigateActionMatched - && passwordInputMatched && hasSettingsKeyMatched && f2KeyModeMatched - && clobberSettingsKeyMatched && shortcutKeyEnabledMatched - && hasShortcutKeyMatched && imeActionMatched && localeCodeMatched - && languageCodeMatched && countryCodeMatched; - - if (DEBUG) Log.d(TAG, String.format("<%s%s%s%s%s%s%s%s%s%s%s%s%s> %s", TAG_CASE, + final boolean selected = keyboardSetElementMatched && modeMatched + && navigateActionMatched && passwordInputMatched && hasSettingsKeyMatched + && f2KeyModeMatched && clobberSettingsKeyMatched + && shortcutKeyEnabledMatched && hasShortcutKeyMatched && imeActionMatched + && localeCodeMatched && languageCodeMatched && countryCodeMatched; + + if (DEBUG) Log.d(TAG, String.format("<%s%s%s%s%s%s%s%s%s%s%s%s%s%s> %s", TAG_CASE, + textAttr(a.getString(R.styleable.Keyboard_Case_keyboardSetElement), + "keyboardSetElement"), 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"), |