Plumb the extras data through to the CallService

Add support for the new extras API which allows a Bundle to be passed
with the incoming call intent, and plumb this Bundle all the way
through to the setIncomingCallId call.

Change-Id: I52e7e1d0788ecd01aa427e76de7ccf4d9b75f1f0
diff --git a/src/com/android/telecomm/IncomingCallsManager.java b/src/com/android/telecomm/IncomingCallsManager.java
index 13f1319..d82a7de 100644
--- a/src/com/android/telecomm/IncomingCallsManager.java
+++ b/src/com/android/telecomm/IncomingCallsManager.java
@@ -16,7 +16,9 @@
 
 package com.android.telecomm;
 
+import android.os.Bundle;
 import android.telecomm.CallInfo;
+import android.telecomm.CallService;
 import android.util.Log;
 
 import com.google.common.base.Preconditions;
@@ -53,8 +55,10 @@
      * Starts the timeout sequence in case the call service is unresponsive.
      *
      * @param call The call object.
+     * @param extras The optional extras passed with the incoming call intent (to be returned to
+     *     the call service via {@link CallService#setIncomingCallId(String, android.os.Bundle)}).
      */
-    void retrieveIncomingCall(final Call call) {
+    void retrieveIncomingCall(final Call call, Bundle extras) {
         ThreadUtil.checkOnMainThread();
         Log.d(TAG, "retrieveIncomingCall");
 
@@ -71,7 +75,7 @@
         };
 
         // TODO(gilad): call.retrieve*Call() seems a bit unusual, consider revisiting.
-        call.getCallService().retrieveIncomingCall(callId, errorCallback);
+        call.getCallService().retrieveIncomingCall(callId, extras, errorCallback);
     }
 
     /**