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

Commit 3fd3d310 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Prevent NPE due to race condition in CallAudioRouteStateMachine." into main

parents de9ef3fd 64f99792
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2110,8 +2110,9 @@ public class CallAudioRouteStateMachine extends StateMachine implements CallAudi
    private int getCurrentCallSupportedRoutes() {
        int supportedRoutes = CallAudioState.ROUTE_ALL;

        if (mCallsManager.getForegroundCall() != null) {
            supportedRoutes &= mCallsManager.getForegroundCall().getSupportedAudioRoutes();
        Call foregroundCall = mCallsManager.getForegroundCall();
        if (foregroundCall != null) {
            supportedRoutes &= foregroundCall.getSupportedAudioRoutes();
        }

        return supportedRoutes;