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

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

Fixed lingering network bitmask not set issue

If lingering network bitmask is not set, we should
fallback to the network type bitmask.

Fix: 223159318
Test: atest DataNetworkControllerTest & manual
Change-Id: Ia6e2d7197b7a53d2ee2ae880b80bdd39df9532bc
parent 5a4a4172
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();