Skip to content
Snippets Groups Projects
Commit c25e07d2 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix web input type judgment

Bug: 4490948
Change-Id: I71efb8f5784970f1d2a94da1d2eb852f7f11885f
parent 88251a95
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment