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

Commit b7219108 authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "Non-default link should be cleaned up on telephony db change."

parents 4a41cb31 3119b960
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -1025,10 +1025,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
     * Handles changes to the APN database.
     */
    private void onApnChanged() {
        // TODO: How to handle when multiple APNs are active?

        ApnContext defaultApnContext = mApnContexts.get(Phone.APN_TYPE_DEFAULT);
        boolean defaultApnIsDisconnected = defaultApnContext.isDisconnected();
        State overallState = getOverallState();
        boolean isDisconnected = (overallState == State.IDLE || overallState == State.FAILED);

        if (mPhone instanceof GSMPhone) {
            // The "current" may no longer be valid.  MMS depends on this to send properly. TBD
@@ -1039,8 +1037,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
        // match the current operator.
        if (DBG) log("onApnChanged: createAllApnList and cleanUpAllConnections");
        createAllApnList();
        cleanUpAllConnections(!defaultApnIsDisconnected, Phone.REASON_APN_CHANGED);
        if (defaultApnIsDisconnected) {
        cleanUpAllConnections(!isDisconnected, Phone.REASON_APN_CHANGED);
        if (isDisconnected) {
            setupDataOnReadyApns(Phone.REASON_APN_CHANGED);
        }
    }