1
0
Fork 0

fixed dialer field detection

This commit is contained in:
Dimo Karaivanov 2023-03-20 11:30:01 +02:00
parent 3f3b733490
commit d6884ef894

View file

@ -40,10 +40,14 @@ public class InputType {
* NOTE: A Dialer field is not the same as a Phone field in a phone book. * NOTE: A Dialer field is not the same as a Phone field in a phone book.
*/ */
public boolean isDialer() { public boolean isDialer() {
if (field == null) {
return false;
}
int inputType = field.inputType & android.text.InputType.TYPE_MASK_CLASS;
return return
field != null inputType == android.text.InputType.TYPE_CLASS_PHONE && field.packageName.equals("com.android.dialer");
&& field.inputType == android.text.InputType.TYPE_CLASS_PHONE
&& field.packageName.equals("com.android.dialer");
} }