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

Commit ecb75ffc authored by Jack Yu's avatar Jack Yu
Browse files

Revert the change to fix the failed unit test cases

Also fixed some typos.

Test: telephony unit tests
bug: 29579544
Change-Id: Ia7e867c5f1723f528ed543e7da3a5254ae7b7729
parent 94bd0070
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -816,7 +816,7 @@ public class DataConnection extends StateMachine {
     *
     * This gets set once per connection setup and is based on conditions at that time.
     * We could theoretically have dynamic capabilities but now is not a good time to
     * experiement with that.
     * experiment with that.
     *
     * This flag overrides the APN-based restriction capability, restricting the network
     * based on both having a NetworkRequest with restricted AND needing a restricted
+1 −1
Original line number Diff line number Diff line
@@ -1556,7 +1556,7 @@ public class DcTracker extends Handler {
        boolean isEmergencyApn = apnContext.getApnType().equals(PhoneConstants.APN_TYPE_EMERGENCY);
        final ServiceStateTracker sst = mPhone.getServiceStateTracker();

        // set to false if apn type is non-metered or if we have a restricted (priveleged)
        // set to false if apn type is non-metered or if we have a restricted (privileged)
        // request for the network.
        // TODO - may want restricted requests to only apply to carrier-limited data access
        //        rather than applying to user limited as well.
+5 −4
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.nullable;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.never;
@@ -705,9 +704,6 @@ public class DcTrackerTest extends TelephonyTest {
        mDct.setDataEnabled(true);

        waitForMs(200);
        verify(mSimulatedCommandsVerifier, times(1)).setInitialAttachApn(any(DataProfile.class),
                eq(true), nullable(Message.class));

        ArgumentCaptor<DataProfile> dpCaptor = ArgumentCaptor.forClass(DataProfile.class);
        verify(mSimulatedCommandsVerifier, times(1)).setupDataCall(
                eq(ServiceState.RIL_RADIO_TECHNOLOGY_UMTS), dpCaptor.capture(),
@@ -717,6 +713,11 @@ public class DcTrackerTest extends TelephonyTest {
        assertEquals(DctConstants.State.CONNECTED, mDct.getOverallState());
        assertEquals(DctConstants.State.IDLE, mDct.getState(PhoneConstants.APN_TYPE_DEFAULT));
        assertEquals(DctConstants.State.CONNECTED, mDct.getState(PhoneConstants.APN_TYPE_IMS));

        // reset roaming settings / data enabled settings at end of this test
        mDct.setDataOnRoamingEnabled(roamingEnabled);
        mDct.setDataEnabled(dataEnabled);
        waitForMs(200);
    }

    // Test the default data switch scenario.