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

Commit 98661345 authored by Sarah Chin's avatar Sarah Chin Committed by Automerger Merge Worker
Browse files

DCT get SubscriptionPlans when initialized am: 29cfb789

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/12677144

Change-Id: I5232676175aafa674e53f707a35c45b3f2ae4775
parents 4dddf875 29cfb789
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ public class DcTracker extends Handler {
    private boolean mNrSaSub6Unmetered = false;
    private boolean mRoamingUnmetered = false;

    /* List of SubscriptionPlans, updated on SubscriptionManager.setSubscriptionPlans */
    /* List of SubscriptionPlans, updated when initialized and when plans are changed. */
    private List<SubscriptionPlan> mSubscriptionPlans = null;

    @SimState
@@ -420,6 +420,7 @@ public class DcTracker extends Handler {
            if (mPhone == null || mPhone.getSubId() != subId) return;

            mSubscriptionPlans = plans == null ? null : Arrays.asList(plans);
            if (DBG) log("SubscriptionPlans changed: " + mSubscriptionPlans);
            reevaluateUnmeteredConnections();
        }
    };
@@ -2366,6 +2367,13 @@ public class DcTracker extends Handler {
        setDefaultPreferredApnIfNeeded();
        read5GConfiguration();
        registerSettingsObserver();
        SubscriptionPlan[] plans = mNetworkPolicyManager.getSubscriptionPlans(
                mPhone.getSubId(), mPhone.getContext().getOpPackageName());
        if (plans != null) {
            mSubscriptionPlans = Arrays.asList(plans);
            if (DBG) log("SubscriptionPlans initialized: " + mSubscriptionPlans);
            reevaluateUnmeteredConnections();
        }
        mConfigReady = true;
    }