diff options
author | Santos Cordon <santoscordon@google.com> | 2014-07-02 11:08:59 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2014-07-02 11:34:46 -0700 |
commit | 91c90d131e3aac91143406783851c225fdca8916 (patch) | |
tree | 2ed5865ccf3eed24ab50a91aa5dfe29367e32f3c | |
parent | e9b9290142e0e0e767536bc0e8f89f80f7ad3926 (diff) |
Make use of PhoneManager.handlePinMmi() in dialer.
Change-Id: I00a935860c218ec3744ed26265bce2988ef39560
-rw-r--r-- | src/com/android/dialer/SpecialCharSequenceMgr.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/com/android/dialer/SpecialCharSequenceMgr.java b/src/com/android/dialer/SpecialCharSequenceMgr.java index 9d622aa16..4a6e4b289 100644 --- a/src/com/android/dialer/SpecialCharSequenceMgr.java +++ b/src/com/android/dialer/SpecialCharSequenceMgr.java @@ -20,7 +20,6 @@ import android.app.AlertDialog; import android.app.KeyguardManager; import android.app.ProgressDialog; import android.content.ActivityNotFoundException; -import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; @@ -28,8 +27,7 @@ import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Looper; -import android.os.RemoteException; -import android.os.ServiceManager; +import android.phone.PhoneManager; import android.provider.Settings; import android.telephony.PhoneNumberUtils; import android.telephony.TelephonyManager; @@ -39,7 +37,6 @@ import android.widget.EditText; import android.widget.Toast; import com.android.contacts.common.database.NoNullCursorAsyncQueryHandler; -import com.android.internal.telephony.ITelephony; /** * Helper class to listen for some magic character sequences @@ -228,13 +225,9 @@ public class SpecialCharSequenceMgr { static boolean handlePinEntry(Context context, String input) { if ((input.startsWith("**04") || input.startsWith("**05")) && input.endsWith("#")) { - try { - return ITelephony.Stub.asInterface(ServiceManager.getService("phone")) - .handlePinMmi(input); - } catch (RemoteException e) { - Log.e(TAG, "Failed to handlePinMmi due to remote exception"); - return false; - } + PhoneManager phoneManager = + (PhoneManager) context.getSystemService(Context.PHONE_SERVICE); + return phoneManager.handlePinMmi(input); } return false; } |