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

Commit 40724ed0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Deactivate default APN only on network-agent disconnection"

parents 2a767ac4 02b09ac6
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -2051,7 +2051,21 @@ public final class DcTracker extends DcTrackerBase {
                }
            } else if (met) {
                apnContext.setReason(Phone.REASON_DATA_DISABLED);

                // If ConnectivityService has disabled this network, stop trying to bring
                // it up, but do not tear it down - ConnectivityService will do that
                // directly by talking with the DataConnection.
                //
                // This doesn't apply to DUN, however.  Those connections have special
                // requirements from carriers and we need stop using them when the dun
                // request goes away.  This applies to both CDMA and GSM because they both
                // can declare the DUN APN sharable by default traffic, thus still satisfying
                // those requests and not torn down organically.
                if ((apnContext.getApnType() == PhoneConstants.APN_TYPE_DUN && teardownForDun()) ||
                        (apnContext.getApnType() == PhoneConstants.APN_TYPE_MMS)) {
                    cleanup = true;
                } else {
                    cleanup = false;
                }
            } else {
                apnContext.setReason(Phone.REASON_DATA_DEPENDENCY_UNMET);
            }