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

Commit 5ae70cb4 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Automerger Merge Worker
Browse files

Merge "Make sure to obtain correct subId in carrier config change." am: d0c4d60c

Change-Id: Icd8f363bb233eefefdcfca13c6681d800fddd6d8
parents 3918ca5a d0c4d60c
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -346,6 +346,22 @@ public class MultiSimSettingController extends Handler {
            return;
        }

        // b/153860050 Occasionally we receive carrier config change broadcast without subId
        // being specified in it. So here we do additional check to make sur we don't miss the
        // subId.
        if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
            int[] subIds = mSubController.getSubId(phoneId);
            if (!ArrayUtils.isEmpty(subIds)) {
                CarrierConfigManager cm = (CarrierConfigManager) mContext.getSystemService(
                        mContext.CARRIER_CONFIG_SERVICE);
                if (cm != null && cm.getConfigForSubId(subIds[0]) != null) {
                    loge("onCarrierConfigChanged with invalid subId while subd "
                            + subIds[0] + " is active and its config is loaded");
                    subId = subIds[0];
                }
            }
        }

        mCarrierConfigLoadedSubIds[phoneId] = subId;
        reEvaluateAll();
    }
+2 −0
Original line number Diff line number Diff line
@@ -356,6 +356,8 @@ public class SubscriptionInfoUpdater extends Handler {

            case EVENT_MULTI_SIM_CONFIG_CHANGED:
                onMultiSimConfigChanged();
                break;

            default:
                logd("Unknown msg:" + msg.what);
        }