fixed dialer field detection
This commit is contained in:
parent
3f3b733490
commit
d6884ef894
1 changed files with 7 additions and 3 deletions
|
|
@ -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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue