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

Commit 3519edb0 authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "Fix regression in emergency dialing auto-disconnect code." into pi-dev

parents 6b772309 130ad286
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2848,11 +2848,13 @@ public class CallsManager extends Call.ListenerBase
                return false;
            }

            // Disconnected the live call if the outgoing call is an emergency call.
            if (isEmergency && !canHold(liveCall)) {
            // If we have the max number of held managed calls and we're placing an emergency call,
            // we'll disconnect the ongoing call if it cannot be held.
            if (hasMaximumManagedHoldingCalls(call) && isEmergency && !canHold(liveCall)) {
                call.getAnalytics().setCallIsAdditional(true);
                liveCall.getAnalytics().setCallIsInterrupted(true);
                liveCall.disconnect("emergency, can't hold");
                liveCall.disconnect("disconnecting to make room for emergency call "
                        + call.getId());
                return true;
            }