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

Commit b5072c6d authored by Jack Yu's avatar Jack Yu
Browse files

Fixed the aggresive data call setup

Whenever data RAT changes we try to setup a data call. Now we will
not do that if it switches to RIL_RADIO_TECHNOLOGY_UNKNOWN.

Test: Manual
bug: 64099426
Change-Id: I9c655bae80cf3a0fda069df241a88ce2f0f5cefc
parent cfecf979
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -3821,6 +3821,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,
@@ -4428,17 +4436,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())