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

Commit 96e2ae54 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Ensure ImsCallProfile updates with only codec change updates to telecom.

Fixes: 171606385
Test: Added unit test to ensure audio codec update is registered.
Change-Id: I45993cec58aa8f5318cc4cd0745dbcf99622f405
parent 5d0a87bc
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1068,6 +1068,7 @@ public class ImsPhoneConnection extends Connection implements
                mAudioCodec = localCallProfile.mMediaProfile.mAudioQuality;
                mAudioCodec = localCallProfile.mMediaProfile.mAudioQuality;
                mMetrics.writeAudioCodecIms(mOwner.mPhone.getPhoneId(), imsCall.getCallSession());
                mMetrics.writeAudioCodecIms(mOwner.mPhone.getPhoneId(), imsCall.getCallSession());
                mOwner.getPhone().getVoiceCallSessionStats().onAudioCodecChanged(this, mAudioCodec);
                mOwner.getPhone().getVoiceCallSessionStats().onAudioCodecChanged(this, mAudioCodec);
                changed = true;
            }
            }


            if (localCallProfile != null
            if (localCallProfile != null
+10 −0
Original line number Original line Diff line number Diff line
@@ -149,6 +149,16 @@ public class ImsPhoneConnectionTest extends TelephonyTest {
                eq(Call.State.ACTIVE));
                eq(Call.State.ACTIVE));
    }
    }


    @Test
    @SmallTest
    public void testUpdateCodec() {
        // MO Foreground Connection dailing -> active
        mConnectionUT = new ImsPhoneConnection(mImsPhone, "+1 (700).555-41NN1234", mImsCT,
                mForeGroundCall, false);
        doReturn(Call.State.ACTIVE).when(mForeGroundCall).getState();
        assertTrue(mConnectionUT.updateMediaCapabilities(mImsCall));
    }

    @Test
    @Test
    @SmallTest
    @SmallTest
    public void testImsUpdateStateBackGround() {
    public void testImsUpdateStateBackGround() {