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

Commit 43398e00 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Android (Google) Code Review
Browse files

Merge "Telecom: avoid system crash if there's no speaker" into main

parents aaab4ef5 cb6122e4
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;