diff options
author | Santos Cordon <santoscordon@google.com> | 2014-07-02 20:17:40 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-02 19:00:44 +0000 |
commit | 81daeb069f60ad97d80823049aa34819463a8a28 (patch) | |
tree | fe9272f56bc1db57271944d68ee779552ac24689 | |
parent | 561a5e0c3cd67473924e6c5d9c1df93c0f4e58f8 (diff) | |
parent | 91c90d131e3aac91143406783851c225fdca8916 (diff) |
Merge "Make use of PhoneManager.handlePinMmi() in dialer."
-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; } |