diff --git a/src/io/github/sspanak/tt9/ime/helpers/InputType.java b/src/io/github/sspanak/tt9/ime/helpers/InputType.java index b73bb324..d9334d9d 100644 --- a/src/io/github/sspanak/tt9/ime/helpers/InputType.java +++ b/src/io/github/sspanak/tt9/ime/helpers/InputType.java @@ -40,10 +40,14 @@ public class InputType { * NOTE: A Dialer field is not the same as a Phone field in a phone book. */ public boolean isDialer() { + if (field == null) { + return false; + } + + int inputType = field.inputType & android.text.InputType.TYPE_MASK_CLASS; + return - field != null - && field.inputType == android.text.InputType.TYPE_CLASS_PHONE - && field.packageName.equals("com.android.dialer"); + inputType == android.text.InputType.TYPE_CLASS_PHONE && field.packageName.equals("com.android.dialer"); }