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

Commit f0aba61e authored by Jack Yu's avatar Jack Yu Committed by android-build-merger
Browse files

Merge "Fixed the aggresive data call setup" into oc-dr1-dev

am: e513467a

Change-Id: If9398e7673b27358c30486b992bb6810a1df0849
parents 32bada91 e513467a
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -3721,6 +3721,14 @@ public class DcTracker extends Handler {
                break;

            case DctConstants.EVENT_DATA_RAT_CHANGED:
                if (mPhone.getServiceState().getRilDataRadioTechnology()
                        == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                    // unknown rat is an exception for data rat change. It's only received when out
                    // of service and is not applicable for apn bearer bitmask. We should bypass the
                    // check of waiting apn list and keep the data connection on, and no need to
                    // setup a new one.
                    break;
                }
                cleanUpConnectionsOnUpdatedApns(false, Phone.REASON_NW_TYPE_CHANGED);
                //May new Network allow setupData, so try it here
                setupDataOnConnectableApns(Phone.REASON_NW_TYPE_CHANGED,
@@ -4345,17 +4353,11 @@ public class DcTracker extends Handler {
        if (mAllApnSettings != null && mAllApnSettings.isEmpty()) {
            cleanUpAllConnections(tearDown, Phone.REASON_APN_CHANGED);
        } else {
            int radioTech = mPhone.getServiceState().getRilDataRadioTechnology();
            if (radioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                // unknown rat is an exception for data rat change. Its only received when out of
                // service and is not applicable for apn bearer bitmask. We should bypass the check
                // of waiting apn list and keep the data connection on.
                return;
            }
            for (ApnContext apnContext : mApnContexts.values()) {
                ArrayList<ApnSetting> currentWaitingApns = apnContext.getWaitingApns();
                ArrayList<ApnSetting> waitingApns = buildWaitingApns(
                        apnContext.getApnType(), radioTech);
                        apnContext.getApnType(),
                        mPhone.getServiceState().getRilDataRadioTechnology());
                if (VDBG) log("new waitingApns:" + waitingApns);
                if ((currentWaitingApns != null)
                        && ((waitingApns.size() != currentWaitingApns.size())