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

Commit 38c62328 authored by Jack Yu's avatar Jack Yu Committed by Android (Google) Code Review
Browse files

Merge changes from topic "linger" into tm-mainline-prod

* changes:
  [automerge] Fixed lingering network bitmask not set issue 2p: c5b493d3
  Fixed lingering network bitmask not set issue
parents 090a51a7 f0e74568
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -1048,6 +1048,27 @@ public class DataNetworkControllerTest extends TelephonyTest {
        verifyInternetConnected();
    }

    @Test
    public void testRatChangesLingeringNotSet() throws Exception {
        serviceStateChanged(TelephonyManager.NETWORK_TYPE_LTE,
                NetworkRegistrationInfo.REGISTRATION_STATE_HOME);
        TelephonyNetworkRequest fotaRequest = createNetworkRequest(
                NetworkCapabilities.NET_CAPABILITY_FOTA);
        mDataNetworkControllerUT.addNetworkRequest(fotaRequest);
        processAllMessages();

        verifyConnectedNetworkHasCapabilities(NetworkCapabilities.NET_CAPABILITY_FOTA);

        // Now RAT changes from LTE to UMTS, since FOTA APN does not have lingering set, only
        // network type bitmask should be used. Fota network should be torn down.
        serviceStateChanged(TelephonyManager.NETWORK_TYPE_UMTS,
                NetworkRegistrationInfo.REGISTRATION_STATE_HOME);
        processAllMessages();

        verifyNoConnectedNetworkHasCapability(NetworkCapabilities.NET_CAPABILITY_FOTA);
        verifyAllDataDisconnected();
    }

    @Test
    public void testVoiceCallEndedOnVoiceDataNonConcurrentNetwork() throws Exception {
        doReturn(false).when(mSST).isConcurrentVoiceAndDataAllowed();