mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Fix inconsistent default PIN keyboard type.
This commit is contained in:
committed by
Greyson Parrelli
parent
7f429dc769
commit
c24993960d
@@ -24,15 +24,6 @@ enum class PinKeyboardType(val code: String) {
|
||||
*/
|
||||
@JvmStatic
|
||||
fun fromCode(code: String?): PinKeyboardType = entries.firstOrNull { it.code == code } ?: NUMERIC
|
||||
|
||||
/**
|
||||
* Gets the keyboard type that is associated with an [EditText]'s current input type.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun fromEditText(editText: EditText): PinKeyboardType = when {
|
||||
(editText.inputType and InputType.TYPE_MASK_CLASS) == InputType.TYPE_CLASS_NUMBER -> NUMERIC
|
||||
else -> ALPHA_NUMERIC
|
||||
}
|
||||
}
|
||||
|
||||
private val inputType: Int by lazy {
|
||||
|
||||
Reference in New Issue
Block a user