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

Commit 5d01ebb8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix NPE in DialerCall that cause it crash and failed to show disconnection error message."

parents 59e8aa35 0ddedc34
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -208,19 +208,23 @@ public class CallButtonPresenter
    int newRoute;
    if (audioState.getRoute() == CallAudioState.ROUTE_SPEAKER) {
      newRoute = CallAudioState.ROUTE_WIRED_OR_EARPIECE;
      if (call != null) {
        Logger.get(context)
                .logCallImpression(
                        DialerImpression.Type.IN_CALL_SCREEN_TURN_ON_WIRED_OR_EARPIECE,
                        call.getUniqueCallId(),
                        call.getTimeAddedMs());
      }
    } else {
      newRoute = CallAudioState.ROUTE_SPEAKER;
      if (call != null) {
        Logger.get(context)
                .logCallImpression(
                        DialerImpression.Type.IN_CALL_SCREEN_TURN_ON_SPEAKERPHONE,
                        call.getUniqueCallId(),
                        call.getTimeAddedMs());
      }
    }

    setAudioRoute(newRoute);
  }