Merge "Don't stop outgoing calls if we are the foreground call." into lmp-dev
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 08dcbea..1840c7e 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -1063,6 +1063,13 @@
             // have to change.
             Call liveCall = getFirstCallWithState(call, LIVE_CALL_STATES);
 
+            if (call == liveCall) {
+                // If the call is already the foreground call, then we are golden.
+                // This can happen after the user selects an account in the PRE_DIAL_WAIT
+                // state since the call was already populated into the list.
+                return true;
+            }
+
             if (hasMaximumOutgoingCalls()) {
                 // Disconnect the current outgoing call if it's not an emergency call. If the user
                 // tries to make two outgoing calls to different emergency call numbers, we will try