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

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

Do not send call event if handover call has no ConnectionService bound.

If the handover TO ConnectionService returns a null Connection, failing
the handover, Telecom will still try to report to the "to" Connection
that the handover failed, when it is in reality not possible to report
that.

Adding a null CS check when sending this CallEvent.

Test: Manual
Bug: 37896563
Change-Id: I4e041dade46de173247ea6110b9da0e356af606b
parent fa1b42ca
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2178,7 +2178,12 @@ public class CallsManager extends Call.ListenerBase
                    handoverFrom.onConnectionEvent(Connection.EVENT_HANDOVER_FAILED, null);
                    // Inform the "to" ConnectionService that handover to it has failed.  This
                    // allows the ConnectionService the call was being handed over
                    if (call.getConnectionService() != null) {
                        // Only attempt if the call has a bound ConnectionService if handover failed
                        // early on in the handover process, the CS will be unbound and we won't be
                        // able to send the call event.
                        call.sendCallEvent(android.telecom.Call.EVENT_HANDOVER_FAILED, null);
                    }
                    call.markHandoverFinished();
                }
            // If this call was disconnected because it was handed over TO another call, report the