aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-01-25 02:38:44 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-25 02:38:44 -0800
commit210f323089373550c02e638636a31f502b4640d4 (patch)
tree1318e865bb684d26774bd2cd9f2aac53a566f555 /java/src
parent3d2663af06feb1180906a8b139c8231939dfb5f1 (diff)
parent2419a31c98927da807710e8ea713aa8a98b8c3d7 (diff)
downloadlatinime-210f323089373550c02e638636a31f502b4640d4.tar.gz
latinime-210f323089373550c02e638636a31f502b4640d4.tar.xz
latinime-210f323089373550c02e638636a31f502b4640d4.zip
am 2419a31c: Merge "Add element predicator to <switch><case> condition of Keyboard"
* commit '2419a31c98927da807710e8ea713aa8a98b8c3d7': Add element predicator to <switch><case> condition of Keyboard
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/Keyboard.java19
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 8c386dad2..72fc33809 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"),