Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 047dd2df authored by Zoey Chen's avatar Zoey Chen Committed by Gerrit Code Review
Browse files

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

parents 171eabcb ac92bab3
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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;
+1 −2
Original line number Original line Diff line number Diff line
@@ -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;
            }
            }
        }
        }