diff options
author | Yorke Lee <yorkelee@google.com> | 2015-04-15 21:24:22 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-15 21:24:22 +0000 |
commit | 1582ac15d1f30a651000aa5d5098d73be3aa4810 (patch) | |
tree | 8e2da21eb2af4a5f9cb2c4b4ac3ff179ae7bd9e0 /src | |
parent | 4015d9e2f59143216e9d749d475e3b1c0ae6a0eb (diff) | |
parent | 3af7e5675e118b3f135b5bab1da1f666c8f268d6 (diff) |
Merge "Use TelecommManager.getDefaultOutgoingPhoneAccount"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/SpecialCharSequenceMgr.java | 5 | ||||
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/dialer/SpecialCharSequenceMgr.java b/src/com/android/dialer/SpecialCharSequenceMgr.java index 9713a2887..36145aaef 100644 --- a/src/com/android/dialer/SpecialCharSequenceMgr.java +++ b/src/com/android/dialer/SpecialCharSequenceMgr.java @@ -30,6 +30,7 @@ import android.database.Cursor; import android.net.Uri; import android.os.Looper; import android.provider.Settings; +import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telephony.PhoneNumberUtils; @@ -213,7 +214,7 @@ public class SpecialCharSequenceMgr { PhoneAccountUtils.getSubscriptionPhoneAccounts(context); boolean hasUserSelectedDefault = subscriptionAccountHandles.contains( - telecomManager.getUserSelectedOutgoingPhoneAccount()); + telecomManager.getDefaultOutgoingPhoneAccount(PhoneAccount.SCHEME_TEL)); if (subscriptionAccountHandles.size() == 1 || hasUserSelectedDefault) { Uri uri = telecomManager.getAdnUriForPhoneAccount(null); @@ -278,7 +279,7 @@ public class SpecialCharSequenceMgr { List<PhoneAccountHandle> subscriptionAccountHandles = PhoneAccountUtils.getSubscriptionPhoneAccounts(context); boolean hasUserSelectedDefault = subscriptionAccountHandles.contains( - telecomManager.getUserSelectedOutgoingPhoneAccount()); + telecomManager.getDefaultOutgoingPhoneAccount(PhoneAccount.SCHEME_TEL)); if (subscriptionAccountHandles.size() == 1 || hasUserSelectedDefault) { // Don't bring up the dialog for single-SIM or if the default outgoing account is diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index a910f7a1e..9b71b98db 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -935,7 +935,8 @@ public class DialpadFragment extends Fragment List<PhoneAccountHandle> subscriptionAccountHandles = PhoneAccountUtils.getSubscriptionPhoneAccounts(getActivity()); boolean hasUserSelectedDefault = subscriptionAccountHandles.contains( - getTelecomManager().getUserSelectedOutgoingPhoneAccount()); + getTelecomManager().getDefaultOutgoingPhoneAccount( + PhoneAccount.SCHEME_VOICEMAIL)); boolean needsAccountDisambiguation = subscriptionAccountHandles.size() > 1 && !hasUserSelectedDefault; @@ -1526,7 +1527,8 @@ public class DialpadFragment extends Fragment private boolean isVoicemailAvailable() { try { PhoneAccountHandle defaultUserSelectedAccount = - getTelecomManager().getUserSelectedOutgoingPhoneAccount(); + getTelecomManager().getDefaultOutgoingPhoneAccount( + PhoneAccount.SCHEME_VOICEMAIL); if (defaultUserSelectedAccount == null) { // In a single-SIM phone, there is no default outgoing phone account selected by // the user, so just call TelephonyManager#getVoicemailNumber directly. |