Merge "[Settings] Replace #getSubIdForPhoneAccount with #getSubscriptionId" am: 047dd2dff9 am: 3835293aea

Change-Id: I9750d2b07e3b6280d2e3e9e2779f2740d24f0cdf
This commit is contained in:
Automerger Merge Worker
2019-12-26 09:55:38 +00:00
2 changed files with 2 additions and 4 deletions

View File

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

View File

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