Pass extras between call intents and Telecomm for outgoing calls
Enable bundled extras for outgoing calls in order to pass
information from dialer or contacts to the incallui.
Bug: 15284651
Change-Id: Ic34c8a49bf599ebc2924c342eddde051216d3266
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index b7cc233..87d5f4e 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -288,8 +288,13 @@
* NOTE: emergency calls will never pass through this because they call
* placeOutgoingCall directly.
*
+ * @param handle Handle to connect the call with.
+ * @param phoneAccountHandle The phone account which contains the component name of the connection
+ * service to use for this call.
+ * @param extras The optional extras Bundle passed with the intent used for the outgoing call.
+ *
*/
- Call startOutgoingCall(Uri handle, PhoneAccountHandle phoneAccountHandle) {
+ Call startOutgoingCall(Uri handle, PhoneAccountHandle phoneAccountHandle, Bundle extras) {
// We only allow a single outgoing call at any given time. Before placing a call, make sure
// there doesn't already exist another outgoing call.
Call call = getFirstCallWithState(CallState.NEW, CallState.DIALING);
@@ -309,6 +314,7 @@
phoneAccountHandle,
false /* isIncoming */,
false /* isConference */);
+ call.setExtras(extras);
call.setState(CallState.CONNECTING);
// TODO: Move this to be a part of addCall()