Merge "[Settings] Replace #getSubIdForPhoneAccount with #getSubscriptionId"

am: 047dd2dff9

Change-Id: Ia665022e1d3357f68109905f976b84e89f66c045
This commit is contained in:
Zoey Chen
2019-12-26 01:39:17 -08:00
committed by android-build-merger
2 changed files with 2 additions and 4 deletions

View File

@@ -47,8 +47,7 @@ public class CallsSimListDialogFragment extends SimListDialogFragment {
return result; return result;
} }
for (PhoneAccountHandle handle : phoneAccounts) { for (PhoneAccountHandle handle : phoneAccounts) {
final PhoneAccount phoneAccount = telecomManager.getPhoneAccount(handle); final int subId = telephonyManager.getSubscriptionId(handle);
final int subId = telephonyManager.getSubIdForPhoneAccount(phoneAccount);
if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) { if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
continue; continue;

View File

@@ -176,8 +176,7 @@ public class SimDialogActivity extends FragmentActivity {
final TelephonyManager telephonyManager = getSystemService(TelephonyManager.class); final TelephonyManager telephonyManager = getSystemService(TelephonyManager.class);
for (PhoneAccountHandle handle : telecomManager.getCallCapablePhoneAccounts()) { for (PhoneAccountHandle handle : telecomManager.getCallCapablePhoneAccounts()) {
final PhoneAccount phoneAccount = telecomManager.getPhoneAccount(handle); if (subId == telephonyManager.getSubscriptionId(handle)) {
if (subId == telephonyManager.getSubIdForPhoneAccount(phoneAccount)) {
return handle; return handle;
} }
} }