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

Commit af0722d0 authored by Naveen Kalla's avatar Naveen Kalla
Browse files

Retry data call on low priority APNs when high priority APN is disabled.

When only single data call is allowed, when higher priority APN is
disabled, retry data call on lower priority connectable APNs

Bug: 32814839
Test: Manual change network modes between LTE/CDMA/UMTS, CDMA only,
      CDMA (auto), CDMA (only) and LTE/CDMA/UMTS. And ensure that
      we can browse internet in all modes.
Change-Id: If52a3ae3c1ca86c19c90e2bf1ad1b36458f47060
parent 40b0e247
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2617,6 +2617,16 @@ public class DcTracker extends Handler {
        // TODO change our retry manager to use the appropriate numbers for the new APN
        if (DBG) log("onEnableApn: apnContext=" + apnContext + " call applyNewState");
        applyNewState(apnContext, enabled == DctConstants.ENABLED, apnContext.getDependencyMet());

        if ((enabled == DctConstants.DISABLED) &&
            isOnlySingleDcAllowed(mPhone.getServiceState().getRilDataRadioTechnology()) &&
            !isHigherPriorityApnContextActive(apnContext)) {

            if(DBG) log("onEnableApn: isOnlySingleDcAllowed true & higher priority APN disabled");
            // If the highest priority APN is disabled and only single
            // data call is allowed, try to setup data call on other connectable APN.
            setupDataOnConnectableApns(Phone.REASON_SINGLE_PDN_ARBITRATION);
        }
    }

    // TODO: We shouldnt need this.