aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-05-28 23:47:21 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-05-30 19:10:25 +0900
commitc25e07d21261583d0eeca5aa0fb6e3ffe93dc603 (patch)
treed16ae8b0a9e8fd344778058a8f279cb88609fa03 /java/src
parent88251a95557480340718053efb8b3574fb513008 (diff)
downloadlatinime-c25e07d21261583d0eeca5aa0fb6e3ffe93dc603.tar.gz
latinime-c25e07d21261583d0eeca5aa0fb6e3ffe93dc603.tar.xz
latinime-c25e07d21261583d0eeca5aa0fb6e3ffe93dc603.zip
Fix web input type judgment
Bug: 4490948 Change-Id: I71efb8f5784970f1d2a94da1d2eb852f7f11885f
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/compat/InputTypeCompatUtils.java8
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java4
2 files changed, 8 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/compat/InputTypeCompatUtils.java b/java/src/com/android/inputmethod/compat/InputTypeCompatUtils.java
index 6684f6a8f..6c2f0f799 100644
--- a/java/src/com/android/inputmethod/compat/InputTypeCompatUtils.java
+++ b/java/src/com/android/inputmethod/compat/InputTypeCompatUtils.java
@@ -60,6 +60,11 @@ public class InputTypeCompatUtils {
: 0;
}
+ private static boolean isWebEditTextInputType(int inputType) {
+ return inputType == (InputType.TYPE_CLASS_TEXT
+ | InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT);
+ }
+
private static boolean isWebPasswordInputType(int inputType) {
return WEB_TEXT_PASSWORD_INPUT_TYPE != 0
&& inputType == WEB_TEXT_PASSWORD_INPUT_TYPE;
@@ -92,8 +97,7 @@ public class InputTypeCompatUtils {
public static boolean isWebInputType(int inputType) {
final int maskedInputType =
inputType & (InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION);
- return maskedInputType == InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT
- || isWebPasswordInputType(maskedInputType)
+ return isWebEditTextInputType(maskedInputType) || isWebPasswordInputType(maskedInputType)
|| isWebEmailAddressInputType(maskedInputType);
}
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 195c929fa..2512118d4 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -39,8 +39,8 @@ import java.util.HashMap;
import java.util.Locale;
public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceChangeListener {
- private static final String TAG = "KeyboardSwitcher";
- private static final boolean DEBUG_CACHE = false;
+ private static final String TAG = KeyboardSwitcher.class.getSimpleName();
+ private static final boolean DEBUG_CACHE = LatinImeLogger.sDBG;
public static final boolean DEBUG_STATE = false;
private static String sConfigDefaultKeyboardThemeId;