Cancel pending call redirection request if there's new one.

Currently we compare call ID from user interaction and saved pending
redirection request call ID to make sure we send the correct request.
But if there's a previous stuck pending request, all requests after that
will be blocked. When the call ID can't match, just cancel the previous
one.

Bug: 182215787
Test: Manually test, TelecomUnitTest
Change-Id: Ib223845138145ecab92e5fec0d2160aba577936b
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index c31d68e..ccce777 100755
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -2258,8 +2258,16 @@
     public void processRedirectedOutgoingCallAfterUserInteraction(String callId, String action) {
         Log.i(this, "processRedirectedOutgoingCallAfterUserInteraction for Call ID %s, action=%s",
                 callId, action);
-        if (mPendingRedirectedOutgoingCall != null && mPendingRedirectedOutgoingCall.getId()
-                .equals(callId)) {
+        if (mPendingRedirectedOutgoingCall != null) {
+            String pendingCallId = mPendingRedirectedOutgoingCall.getId();
+            if (!pendingCallId.equals(callId)) {
+                Log.i(this, "processRedirectedOutgoingCallAfterUserInteraction for new Call ID %s, "
+                        + "cancel the previous pending Call with ID %s", callId, pendingCallId);
+                mPendingRedirectedOutgoingCall.disconnect("Another call redirection requested");
+                mPendingRedirectedOutgoingCallInfo.remove(pendingCallId);
+                mPendingUnredirectedOutgoingCallInfo.remove(pendingCallId);
+            }
+
             if (action.equals(TelecomBroadcastIntentProcessor.ACTION_PLACE_REDIRECTED_CALL)) {
                 mHandler.post(mPendingRedirectedOutgoingCallInfo.get(callId).prepare());
             } else if (action.equals(