Ensure original connection extras are propagated to telecom.

Bug: 22685113
Change-Id: Ie3455e1cea2b093958d8d68f8273bb7b09107c11
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 6c25fc1..afe92bf 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -580,7 +580,7 @@
     void setOriginalConnection(com.android.internal.telephony.Connection originalConnection) {
         Log.v(this, "new TelephonyConnection, originalConnection: " + originalConnection);
         clearOriginalConnection();
-
+        mOriginalConnectionExtras.clear();
         mOriginalConnection = originalConnection;
         getPhone().registerForPreciseCallStateChanged(
                 mHandler, MSG_PRECISE_CALL_STATE_CHANGED, null);
@@ -754,6 +754,14 @@
                     }
                     mOriginalConnectionExtras.clear();
                     mOriginalConnectionExtras.putAll(extras);
+
+                    // Ensure extras are propagated to Telecom.
+                    Bundle connectionExtras = getExtras();
+                    if (connectionExtras == null) {
+                        connectionExtras = new Bundle();
+                    }
+                    connectionExtras.putAll(mOriginalConnectionExtras);
+                    setExtras(connectionExtras);
                 } else {
                     Log.d(this, "Extras update not required");
                 }