am 4483e65c: am 1a373830: Fetch phoneaccount from child for live conf calls.
* commit '4483e65cb66baee55059e785d27f73d094e8538d':
Fetch phoneaccount from child for live conf calls.
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 4761fd8..cebd6bc 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -590,9 +590,19 @@
Log.v(this, "startOutgoingCall found accounts = " + accounts);
- if (mForegroundCall != null && mForegroundCall.getTargetPhoneAccount() != null) {
+ if (mForegroundCall != null) {
+ Call ongoingCall = mForegroundCall;
// If there is an ongoing call, use the same phone account to place this new call.
- phoneAccountHandle = mForegroundCall.getTargetPhoneAccount();
+ // If the ongoing call is a conference call, we fetch the phone account from the
+ // child calls because we don't have targetPhoneAccount set on Conference calls.
+ // TODO: Set targetPhoneAccount for all conference calls (b/23035408).
+ if (ongoingCall.getTargetPhoneAccount() == null &&
+ !ongoingCall.getChildCalls().isEmpty()) {
+ ongoingCall = ongoingCall.getChildCalls().get(0);
+ }
+ if (ongoingCall.getTargetPhoneAccount() != null) {
+ phoneAccountHandle = ongoingCall.getTargetPhoneAccount();
+ }
}
// Only dial with the requested phoneAccount if it is still valid. Otherwise treat this call