Fix web input type judgment
Bug: 4490948 Change-Id: I71efb8f5784970f1d2a94da1d2eb852f7f11885f
This commit is contained in:
parent
88251a9555
commit
c25e07d212
2 changed files with 8 additions and 4 deletions
|
@ -60,6 +60,11 @@ public class InputTypeCompatUtils {
|
||||||
: 0;
|
: 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) {
|
private static boolean isWebPasswordInputType(int inputType) {
|
||||||
return WEB_TEXT_PASSWORD_INPUT_TYPE != 0
|
return WEB_TEXT_PASSWORD_INPUT_TYPE != 0
|
||||||
&& inputType == WEB_TEXT_PASSWORD_INPUT_TYPE;
|
&& inputType == WEB_TEXT_PASSWORD_INPUT_TYPE;
|
||||||
|
@ -92,8 +97,7 @@ public class InputTypeCompatUtils {
|
||||||
public static boolean isWebInputType(int inputType) {
|
public static boolean isWebInputType(int inputType) {
|
||||||
final int maskedInputType =
|
final int maskedInputType =
|
||||||
inputType & (InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION);
|
inputType & (InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION);
|
||||||
return maskedInputType == InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT
|
return isWebEditTextInputType(maskedInputType) || isWebPasswordInputType(maskedInputType)
|
||||||
|| isWebPasswordInputType(maskedInputType)
|
|
||||||
|| isWebEmailAddressInputType(maskedInputType);
|
|| isWebEmailAddressInputType(maskedInputType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ import java.util.HashMap;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceChangeListener {
|
public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
private static final String TAG = "KeyboardSwitcher";
|
private static final String TAG = KeyboardSwitcher.class.getSimpleName();
|
||||||
private static final boolean DEBUG_CACHE = false;
|
private static final boolean DEBUG_CACHE = LatinImeLogger.sDBG;
|
||||||
public static final boolean DEBUG_STATE = false;
|
public static final boolean DEBUG_STATE = false;
|
||||||
|
|
||||||
private static String sConfigDefaultKeyboardThemeId;
|
private static String sConfigDefaultKeyboardThemeId;
|
||||||
|
|
Loading…
Reference in a new issue