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

Commit 7e9968e5 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Add unit test for handling of null call profile after a non-null profile.

Ensure the "wasVideoCall" property is retained as expected.

Test: Added new unit test.
Fixes: 172385662
Change-Id: If907d937f97fec9a0c57a4749a262ffe70c19037
parent e6a695e7
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -121,6 +121,20 @@ public class ImsCallTest extends TelephonyTest {
        assertTrue(imsCall.wasVideoCall());
    }

    @Test
    @SmallTest
    public void testNullCallProfileAfterNonNull() {
        ImsCallProfile profile = new ImsCallProfile();
        profile.mCallType = ImsCallProfile.CALL_TYPE_VT_TX;

        ImsCall imsCall = new ImsCall(mContext, profile);
        assertNotNull(imsCall);
        assertTrue(imsCall.wasVideoCall());

        imsCall.setCallProfile(null);
        assertTrue(imsCall.wasVideoCall());
    }

    @Test
    @SmallTest
    public void testSetWifi() {