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

Commit f5ade44b authored by Chinmay Dhodapkar's avatar Chinmay Dhodapkar
Browse files

[iwlan] clean up data connections on service restart

Not all vendor implementations of Iwlan data service can support
persistence of iwlan tunnels across service crash/restart

Use case impacted:
1) Make IMS wifi call
2) kill iwlandataservice
3) Next call/registration on iwlan fails.

This change introduces a new config based on which
telephony framework can take action to clean up dangling
data connections in case iwlan service restarts

Bug: 158043105
Tests: on device test involving killing/restart of data service.
       verifying subsequent wifi calls work.
Merged-In: Ifd95ff4d11a61b8a8e199c916bf57eeb04144868
Change-Id: Ifd95ff4d11a61b8a8e199c916bf57eeb04144868
(cherry picked from commit c6f23837)
parent a8d6af4e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ public interface PhoneInternalInterface {
    static final String REASON_CSS_INDICATOR_CHANGED = "cssIndicatorChanged";
    static final String REASON_RELEASED_BY_CONNECTIVITY_SERVICE = "releasedByConnectivityService";
    static final String REASON_DATA_ENABLED_OVERRIDE = "dataEnabledOverride";
    static final String REASON_IWLAN_DATA_SERVICE_DIED = "iwlanDataServiceDied";

    // Used for band mode selection methods
    static final int BM_UNSPECIFIED = RILConstants.BAND_MODE_UNSPECIFIED; // automatic
+8 −0
Original line number Diff line number Diff line
@@ -5034,6 +5034,14 @@ public class DcTracker extends Handler {
        if (bound) {
            mDcc.start();
        } else {
            if (mTransportType == AccessNetworkConstants.TRANSPORT_TYPE_WLAN) {
                boolean connPersistenceOnRestart = mPhone.getContext().getResources()
                   .getBoolean(com.android
                       .internal.R.bool.config_wlan_data_service_conn_persistence_on_restart);
                if (!connPersistenceOnRestart) {
                    cleanUpAllConnectionsInternal(false, Phone.REASON_IWLAN_DATA_SERVICE_DIED);
                }
            }
            mDcc.dispose();
        }
        mDataServiceBound = bound;