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

Commit f9f1bc52 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Fix CTS Test Failures.

The call audio refactoring forgot to update SMCS connections about changes
made to the audio route; this was causing tests to fail.

Test: Run Telecom CTS tests
Flag: This fixes code under flag which got rolled back due to test failures.
Bug: 327190527
Change-Id: Ia22a4cd1fc5471a3ff0ea47505875c2f9c5090f8
parent f5094557
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -836,6 +836,16 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
        CallAudioState oldState = mCallAudioState;
        mCallAudioState = callAudioState;
        mCallsManager.onCallAudioStateChanged(oldState, mCallAudioState);
        updateAudioStateForTrackedCalls(mCallAudioState);
    }

    private void updateAudioStateForTrackedCalls(CallAudioState newCallAudioState) {
        Set<Call> calls = mCallsManager.getTrackedCalls();
        for (Call call : calls) {
            if (call != null && call.getConnectionService() != null) {
                call.getConnectionService().onCallAudioStateChanged(call, newCallAudioState);
            }
        }
    }

    private AudioRoute getPreferredAudioRouteFromStrategy() {