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

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

Improve logging for call audio route switches.

1. Add start session for onCommunicationDeviceChanged listener.
2. Add logging in CallDiagnosticServiceController so we know that it
saw an audio route update.

Test: Manual testing to verify logging.
Flag: NONE logging only change (bugfix).
Bug: 401559693
Change-Id: I4ea309ba318b25aac055b093e19a42c724f893a9
parent 60f0b0cf
Loading
Loading
Loading
Loading
+14 −9
Original line number Diff line number Diff line
@@ -242,6 +242,8 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
        mCommunicationDeviceListener = new AudioManager.OnCommunicationDeviceChangedListener() {
            @Override
            public void onCommunicationDeviceChanged(AudioDeviceInfo device) {
                try {
                    Log.startSession("CARC.oCDC");
                    @AudioRoute.AudioRouteType int audioType = getAudioType(device);
                    setCurrentCommunicationDevice(device);
                    Log.i(this, "onCommunicationDeviceChanged: device (%s), audioType (%d)",
@@ -253,6 +255,9 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
                    } else {
                        sendMessageWithSessionInfo(SPEAKER_OFF);
                    }
                } finally {
                    Log.endSession();
                }
            }
        };

+1 −0
Original line number Diff line number Diff line
@@ -331,6 +331,7 @@ public class CallDiagnosticServiceController extends CallsManagerListenerBase {
            CallAudioState newCallAudioState) {
        if (mCallDiagnosticService != null) {
            try {
                Log.i(this, "onCallAudioStateChanged: newAudioState=%s", newCallAudioState);
                mCallDiagnosticService.updateCallAudioState(newCallAudioState);
            } catch (RemoteException e) {
                Log.w(this, "onCallAudioStateChanged: failed %s", e);