mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-27 10:06:21 +00:00
remove unused code
This commit is contained in:
parent
2b1d9e6df9
commit
cb0cc4e65a
1 changed files with 5 additions and 26 deletions
|
@ -12,8 +12,6 @@ import android.view.inputmethod.EditorInfo;
|
|||
public final class InputTypeUtils implements InputType {
|
||||
private static final int WEB_TEXT_PASSWORD_INPUT_TYPE =
|
||||
TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_WEB_PASSWORD;
|
||||
private static final int WEB_TEXT_EMAIL_ADDRESS_INPUT_TYPE =
|
||||
TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS;
|
||||
private static final int NUMBER_PASSWORD_INPUT_TYPE =
|
||||
TYPE_CLASS_NUMBER | TYPE_NUMBER_VARIATION_PASSWORD;
|
||||
private static final int TEXT_PASSWORD_INPUT_TYPE =
|
||||
|
@ -32,23 +30,12 @@ public final class InputTypeUtils implements InputType {
|
|||
// This utility class is not publicly instantiable.
|
||||
}
|
||||
|
||||
private static boolean isWebEditTextInputType(final int inputType) {
|
||||
return inputType == (TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_WEB_EDIT_TEXT);
|
||||
}
|
||||
|
||||
private static boolean isWebPasswordInputType(final int inputType) {
|
||||
return WEB_TEXT_PASSWORD_INPUT_TYPE != 0
|
||||
&& inputType == WEB_TEXT_PASSWORD_INPUT_TYPE;
|
||||
}
|
||||
|
||||
private static boolean isWebEmailAddressInputType(final int inputType) {
|
||||
return WEB_TEXT_EMAIL_ADDRESS_INPUT_TYPE != 0
|
||||
&& inputType == WEB_TEXT_EMAIL_ADDRESS_INPUT_TYPE;
|
||||
return inputType == WEB_TEXT_PASSWORD_INPUT_TYPE;
|
||||
}
|
||||
|
||||
private static boolean isNumberPasswordInputType(final int inputType) {
|
||||
return NUMBER_PASSWORD_INPUT_TYPE != 0
|
||||
&& inputType == NUMBER_PASSWORD_INPUT_TYPE;
|
||||
return inputType == NUMBER_PASSWORD_INPUT_TYPE;
|
||||
}
|
||||
|
||||
private static boolean isTextPasswordInputType(final int inputType) {
|
||||
|
@ -65,29 +52,21 @@ public final class InputTypeUtils implements InputType {
|
|||
}
|
||||
|
||||
public static boolean isUriOrEmailType(final int inputType) {
|
||||
if ((inputType & TYPE_MASK_CLASS) != TYPE_CLASS_TEXT) return false;
|
||||
final int maskedInputType = inputType & TYPE_MASK_VARIATION;
|
||||
return maskedInputType == TYPE_TEXT_VARIATION_URI || isEmailVariation(maskedInputType);
|
||||
}
|
||||
|
||||
public static boolean isWebInputType(final int inputType) {
|
||||
final int maskedInputType =
|
||||
inputType & (TYPE_MASK_CLASS | TYPE_MASK_VARIATION);
|
||||
return isWebEditTextInputType(maskedInputType) || isWebPasswordInputType(maskedInputType)
|
||||
|| isWebEmailAddressInputType(maskedInputType);
|
||||
}
|
||||
|
||||
// Please refer to TextView.isPasswordInputType
|
||||
public static boolean isPasswordInputType(final int inputType) {
|
||||
final int maskedInputType =
|
||||
inputType & (TYPE_MASK_CLASS | TYPE_MASK_VARIATION);
|
||||
final int maskedInputType = inputType & (TYPE_MASK_CLASS | TYPE_MASK_VARIATION);
|
||||
return isTextPasswordInputType(maskedInputType) || isWebPasswordInputType(maskedInputType)
|
||||
|| isNumberPasswordInputType(maskedInputType);
|
||||
}
|
||||
|
||||
// Please refer to TextView.isVisiblePasswordInputType
|
||||
public static boolean isVisiblePasswordInputType(final int inputType) {
|
||||
final int maskedInputType =
|
||||
inputType & (TYPE_MASK_CLASS | TYPE_MASK_VARIATION);
|
||||
final int maskedInputType = inputType & (TYPE_MASK_CLASS | TYPE_MASK_VARIATION);
|
||||
return maskedInputType == TEXT_VISIBLE_PASSWORD_INPUT_TYPE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue