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

Commit cb6122e4 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Telecom: avoid system crash if there's no speaker

Bug: 364682905
Bug: 355455324
Flag: EXEMPT bugfix
Test: atest android.telecom.cts.VideoCallTest
Change-Id: Ifd479fece4c3f40ec56dc49b6cb001c01be64840
parent 8d18e6f7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1142,7 +1142,8 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
                    : mSpeakerDockRoute;
            // Ensure that we default to speaker route if we're in a video call, but disregard it if
            // a wired headset is plugged in.
            if (skipEarpiece && defaultRoute.getType() == AudioRoute.TYPE_EARPIECE) {
            if (skipEarpiece && defaultRoute != null
                    && defaultRoute.getType() == AudioRoute.TYPE_EARPIECE) {
                Log.i(this, "getPreferredAudioRouteFromDefault: Audio routing defaulting to "
                        + "speaker route for video call.");
                defaultRoute = mSpeakerDockRoute;