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

Commit 50a6eae6 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Null check IMS calls in shouldDisconnectActiveCallOnAnswer

Adds a check to shouldDisconnectActiveCallOnAnswer to
ensure that the active IMS call and incoming IMS call
are non-null. This can happen in cases when the
ImsPhoneCallTracker moves into a bad state.

Bug: 36273870
Test: Telephony Unit Tests
Change-Id: Ia31bb8cc6e425b63f836e8244bb3919d10c50731
parent 5b18fad2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2976,6 +2976,10 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
    private boolean shouldDisconnectActiveCallOnAnswer(ImsCall activeCall,
            ImsCall incomingCall) {

        if (activeCall == null || incomingCall == null) {
            return false;
        }

        if (!mDropVideoCallWhenAnsweringAudioCall) {
            return false;
        }