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

Commit ff562ec9 authored by Nazanin Bakhshi's avatar Nazanin Bakhshi Committed by android-build-merger
Browse files

Merge "update data and roaming setting for each subscription when subscriptionGrouping is created"

am: 31849a00

Change-Id: Ie90a47172d4b149c6e31b074756b2430568558aa
parents 09b64357 31849a00
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -159,20 +159,28 @@ public class MultiSimSettingController {
        }
        if (DBG) log("refSubId is " + refSubId);

        boolean enable = false;
        try {
            boolean enable = GlobalSettingsHelper.getBoolean(
            enable = GlobalSettingsHelper.getBoolean(
                    mContext, Settings.Global.MOBILE_DATA, refSubId);
            onUserDataEnabled(refSubId, enable);
        } catch (SettingNotFoundException exception) {
            // Do nothing if it's never set.
            //pass invalid refSubId to fetch the single-sim setting
            enable = GlobalSettingsHelper.getBoolean(
                    mContext, Settings.Global.MOBILE_DATA, INVALID_SUBSCRIPTION_ID, enable);
            onUserDataEnabled(refSubId, enable);
        }

        enable = false;
        try {
            boolean enable = GlobalSettingsHelper.getBoolean(
            enable = GlobalSettingsHelper.getBoolean(
                    mContext, Settings.Global.DATA_ROAMING, refSubId);
            onRoamingDataEnabled(refSubId, enable);
        } catch (SettingNotFoundException exception) {
            // Do nothing if it's never set.
            //pass invalid refSubId to fetch the single-sim setting
            enable = GlobalSettingsHelper.getBoolean(
                    mContext, Settings.Global.DATA_ROAMING, INVALID_SUBSCRIPTION_ID, enable);
            onRoamingDataEnabled(refSubId, enable);
        }
    }

@@ -308,7 +316,6 @@ public class MultiSimSettingController {

        for (SubscriptionInfo info : infoList) {
            int currentSubId = info.getSubscriptionId();
            if (currentSubId == subId) continue;
            // TODO: simplify when setUserDataEnabled becomes singleton
            if (mSubController.isActiveSubId(currentSubId)) {
                // If we end up enabling two active primary subscriptions, don't enable the