Skip ADN section when the phone doesn't support it.

Must be after I52e570ef5d175ed8ae971c5f9889496e30f2c528

Bug: 5487135
Change-Id: Id3b2bcc1cbab591fa25781e5afbd39b020fdefd1
diff --git a/src/com/android/contacts/SpecialCharSequenceMgr.java b/src/com/android/contacts/SpecialCharSequenceMgr.java
index aa6faec..198647e 100644
--- a/src/com/android/contacts/SpecialCharSequenceMgr.java
+++ b/src/com/android/contacts/SpecialCharSequenceMgr.java
@@ -17,6 +17,7 @@
 package com.android.contacts;
 
 import com.android.internal.telephony.ITelephony;
+import com.android.internal.telephony.TelephonyCapabilities;
 
 import android.app.AlertDialog;
 import android.app.KeyguardManager;
@@ -149,6 +150,12 @@
     static boolean handleAdnEntry(Context context, String input, EditText textField) {
         /* ADN entries are of the form "N(N)(N)#" */
 
+        int phoneType = ((TelephonyManager)context.getSystemService(
+                Context.TELEPHONY_SERVICE)).getCurrentPhoneType();
+        if (!TelephonyCapabilities.supportsAdn(phoneType)) {
+            return false;
+        }
+
         // if the phone is keyguard-restricted, then just ignore this
         // input.  We want to make sure that sim card contacts are NOT
         // exposed unless the phone is unlocked, and this code can be