Add gateway information to the ConnectionRequest.
Change-Id: I5a21151873ec15d33d8fbdff24f55f80f6a1ac3a
diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 1169d5a..79e7879 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -699,7 +699,19 @@
} else if (mOriginalCall != null && mOriginalCall.mCallService != null) {
descriptor = mOriginalCall.mCallService.getDescriptor();
}
- return new CallInfo(callId, mState, mHandle, mGatewayInfo, mExtras, descriptor);
+ Bundle extras = mExtras;
+ if (mGatewayInfo != null && mGatewayInfo.getGatewayProviderPackageName() != null &&
+ mGatewayInfo.getOriginalHandle() != null) {
+ extras = (Bundle) mExtras.clone();
+ extras.putString(
+ NewOutgoingCallIntentBroadcaster.EXTRA_GATEWAY_PROVIDER_PACKAGE,
+ mGatewayInfo.getGatewayProviderPackageName());
+ extras.putParcelable(
+ NewOutgoingCallIntentBroadcaster.EXTRA_GATEWAY_ORIGINAL_URI,
+ mGatewayInfo.getOriginalHandle());
+
+ }
+ return new CallInfo(callId, mState, mHandle, mGatewayInfo, extras, descriptor);
}
/** Checks if this is a live call or not. */