diff options
author | Andrew Lee <anwlee@google.com> | 2014-07-01 16:16:57 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-07-01 16:57:22 -0700 |
commit | 012631b27c455b16d78d2dfcace4183ceb6cb46b (patch) | |
tree | 1f538dd9b44d499f7051a29f963b6c9ea6c901f1 | |
parent | 503772eb501d208184cc66bf1ee699640e063093 (diff) |
Replace usages of isVoiceMailNumber with PhoneNumberUtils version.
Change-Id: Ib0ef237e25d2cf4608d257a8c71323fc2fbd58ee
3 files changed, 5 insertions, 4 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index bcb4a5541..f0775e86d 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -31,6 +31,7 @@ import com.android.incalluibind.ServiceFactory; import com.android.services.telephony.common.AudioMode; import android.app.Fragment; +import android.telephony.PhoneNumberUtils; /** * Logic for call buttons. @@ -98,8 +99,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto if (ui != null) { final Fragment callButtonFragment = (Fragment) ui; if (mPreviousState == InCallState.OUTGOING && mCall != null - && TelephonyManagerUtils.isVoiceMailNumber(mCall.getNumber(), - callButtonFragment.getActivity())) { + && PhoneNumberUtils.isVoiceMailNumber(mCall.getNumber())) { ui.displayDialpad(true /* show */, true /* animate */); } } diff --git a/InCallUI/src/com/android/incallui/CallerInfo.java b/InCallUI/src/com/android/incallui/CallerInfo.java index 069b4210e..1650fbb05 100644 --- a/InCallUI/src/com/android/incallui/CallerInfo.java +++ b/InCallUI/src/com/android/incallui/CallerInfo.java @@ -284,7 +284,7 @@ public class CallerInfo { // shortcut and skip the query. if (PhoneNumberHelper.isLocalEmergencyNumber(number, context)) { return new CallerInfo().markAsEmergency(context); - } else if (TelephonyManagerUtils.isVoiceMailNumber(number, context)) { + } else if (PhoneNumberUtils.isVoiceMailNumber(number)) { return new CallerInfo().markAsVoiceMail(context); } diff --git a/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java b/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java index a186d37fe..4a2b4fbf0 100644 --- a/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java +++ b/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java @@ -27,6 +27,7 @@ import android.os.Message; import android.provider.ContactsContract.CommonDataKinds.SipAddress; import android.provider.ContactsContract.Data; import android.provider.ContactsContract.PhoneLookup; +import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import com.android.contacts.common.util.PhoneNumberHelper; @@ -403,7 +404,7 @@ public class CallerInfoAsyncQuery { // check to see if these are recognized numbers, and use shortcuts if we can. if (PhoneNumberHelper.isLocalEmergencyNumber(number, context)) { cw.event = EVENT_EMERGENCY_NUMBER; - } else if (TelephonyManagerUtils.isVoiceMailNumber(number, context)) { + } else if (PhoneNumberUtils.isVoiceMailNumber(number)) { cw.event = EVENT_VOICEMAIL_NUMBER; } else { cw.event = EVENT_NEW_QUERY; |