Don't stop outgoing calls if we are the foreground call.
When attempting outgoing calls we do checks to make sure there is room
for another outgoing call (we only support 1 at a time). But that code
needs to check to see if the new call is already the foreground call and
if so, let it continue.
Without this change, we never make an outgoing call in the "Ask
First" case
Bug: 17672699
Change-Id: I9bf37b08e54e2fc2ace1295ce269775cb14d08f1
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 826afb4..e044087 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -1057,6 +1057,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