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

Commit f6548e2b authored by Brad Ebinger's avatar Brad Ebinger Committed by Android (Google) Code Review
Browse files

Merge "Add an NPE check to remove NPE during disconnect+cancel pending call" into main

parents f3a6e1ba 5e7b91f2
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -5533,9 +5533,10 @@ public class CallsManager extends Call.ListenerBase
            // We are going to place the new outgoing call, so disconnect any ongoing self-managed
            // calls which are ongoing at this time.
            disconnectSelfManagedCalls("outgoing call " + callId);

            if (mPendingCallConfirm != null) {
                mPendingCallConfirm.complete(mPendingCall);
                mPendingCallConfirm = null;
            }
            mPendingCall = null;
        }
    }
@@ -5554,10 +5555,12 @@ public class CallsManager extends Call.ListenerBase
            markCallAsDisconnected(mPendingCall, new DisconnectCause(DisconnectCause.CANCELED));
            markCallAsRemoved(mPendingCall);
            mPendingCall = null;
            if (mPendingCallConfirm != null) {
                mPendingCallConfirm.complete(null);
                mPendingCallConfirm = null;
            }
        }
    }

    /**
     * Called from {@link #startOutgoingCall(Uri, PhoneAccountHandle, Bundle, UserHandle, Intent, String)} when