When adding a new call, use same phone account for call.

Because MSIM does not support having two active calls with different
SIMs, use the SIM of the currently active call to place additional
calls.

Bug: 18461539
Change-Id: I38411a5f9f330d2064830068629651653a0871d3
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 5c8f24f..9762797 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -455,6 +455,11 @@
 
         Log.v(this, "startOutgoingCall found accounts = " + accounts);
 
+        if (mForegroundCall != null && mForegroundCall.getTargetPhoneAccount() != null) {
+            // If there is an ongoing call, use the same phone account to place this new call.
+            phoneAccountHandle = mForegroundCall.getTargetPhoneAccount();
+        }
+
         // Only dial with the requested phoneAccount if it is still valid. Otherwise treat this call
         // as if a phoneAccount was not specified (does the default behavior instead).
         // Note: We will not attempt to dial with a requested phoneAccount if it is disabled.