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

Commit e513467a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 915dfa42 b5072c6d
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -3760,6 +3760,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,
@@ -4384,17 +4392,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())