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

Commit 3c5346d0 authored by Hui Wang's avatar Hui Wang Committed by Automerger Merge Worker
Browse files

Reuse the data connection if the apn setting is same as requested am: 7629a941

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

Change-Id: Id87c3d8124f30a18b6f2c53c2276925f93084eb3
parents 152ac326 7629a941
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2006,7 +2006,7 @@ public class DcTracker extends Handler {
        // this type.
        if (!apnContext.getApnType().equals(PhoneConstants.APN_TYPE_DUN)
                || ServiceState.isGsm(getDataRat())) {
            dataConnection = checkForCompatibleDataConnection(apnContext);
            dataConnection = checkForCompatibleDataConnection(apnContext, apnSetting);
            if (dataConnection != null) {
                // Get the apn setting used by the data connection
                ApnSetting dataConnectionApnSetting = dataConnection.getApnSetting();
@@ -2417,7 +2417,8 @@ public class DcTracker extends Handler {
        }
    }

    private DataConnection checkForCompatibleDataConnection(ApnContext apnContext) {
    private DataConnection checkForCompatibleDataConnection(ApnContext apnContext,
            ApnSetting nextApn) {
        int apnType = apnContext.getApnTypeBitmask();
        ArrayList<ApnSetting> dunSettings = null;

@@ -2456,7 +2457,7 @@ public class DcTracker extends Handler {
                                    + " found canHandle conn=" + curDc);
                        }
                        return curDc;
                    } else if (curDc.isActivating()) {
                    } else if (curDc.isActivating() || apnSetting.equals(nextApn)) {
                        potentialDc = curDc;
                    }
                }