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

Commit 281281bf authored by duho.ro's avatar duho.ro Committed by Vineeta Srivastava
Browse files

Telephony: default subId updating on single slot device

The default sub Id should be updated on single slot device when card
hot-swapped.

Bug: 17400805

Change-Id: If42d4a218e508e65f3e97f2fcd974f622f8011b1
parent 7d61df73
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -558,8 +558,8 @@ public class SubscriptionController extends ISub.Stub {
                                + " slotId=" + slotId + " subId=" + subId
                                + " defaultSubId=" + defaultSubId + " simCount=" + simCount);

                        // Set the default sub if not set
                        if (!SubscriptionManager.isValidSubId(defaultSubId)) {
                        // Set the default sub if not set or if single sim device
                        if (!SubscriptionManager.isValidSubId(defaultSubId) || simCount == 1) {
                            setDefaultSubId(subId);
                        }
                        // If single sim device, set this subscription as the default for everything
@@ -1110,7 +1110,8 @@ public class SubscriptionController extends ISub.Stub {
        logd("[setDefaultSubId] subId=" + subId);
        if (SubscriptionManager.isValidSubId(subId)) {
            int phoneId = getPhoneId(subId);
            if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getPhoneCount()) {
            if (phoneId >= 0 && (phoneId < TelephonyManager.getDefault().getPhoneCount()
                    || TelephonyManager.getDefault().getSimCount() == 1)) {
                mDefaultVoiceSubId = subId;
                // Update MCC MNC device configuration information
                String defaultMccMnc = TelephonyManager.getDefault().getSimOperator(phoneId);