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

Commit 5f5c7298 authored by Jack Yu's avatar Jack Yu
Browse files

Moved DcNetworkAgent into a static class

Now the network agent can be handovered to the new data connection
after handover, so we should break all the implicit references to
the outer class. Otherwise the agent cannot perform the right
action on the right data connection.

Test: Manual
Bug: 128453667
Change-Id: I8d170faf8892b11c6cc75b67460749f75bd260e1
parent b85117c4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -155,6 +155,7 @@ public interface PhoneInternalInterface {
    static final String REASON_CARRIER_ACTION_DISABLE_METERED_APN =
            "carrierActionDisableMeteredApn";
    static final String REASON_CSS_INDICATOR_CHANGED = "cssIndicatorChanged";
    static final String REASON_RELEASED_BY_CONNECTIVITY_SERVICE = "releasedByConnectivityService";

    // Used for band mode selection methods
    static final int BM_UNSPECIFIED = RILConstants.BAND_MODE_UNSPECIFIED; // automatic
+299 −137

File changed.

Preview size limit exceeded, changes collapsed.

+3 −4
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

@@ -741,9 +740,9 @@ public class DataConnectionTest extends TelephonyTest {
        testConnectEvent();
        waitForMs(200);

        DataServiceManager mockDsm = mock(DataServiceManager.class);
        doReturn(AccessNetworkConstants.TRANSPORT_TYPE_WLAN).when(mockDsm).getTransportType();
        replaceInstance(DataConnection.class, "mDataServiceManager", mDc, mockDsm);
        Field field = DataConnection.class.getDeclaredField("mTransportType");
        field.setAccessible(true);
        field.setInt(mDc, AccessNetworkConstants.TRANSPORT_TYPE_WLAN);

        final int sessionHandle = 0xF00;
        final int slotId = 3;