Add the call technology extra for SIP calls for analytics

Set the EXTRA_CALL_TECHNOLOGY_TYPE extra on SipConnection.

Bug: 27529579
Change-Id: I2288057f25a31ef04a716b9f11ac18ed38509ae3
diff --git a/sip/src/com/android/services/telephony/sip/SipConnection.java b/sip/src/com/android/services/telephony/sip/SipConnection.java
index 0d8a6f8..b10ae56 100644
--- a/sip/src/com/android/services/telephony/sip/SipConnection.java
+++ b/sip/src/com/android/services/telephony/sip/SipConnection.java
@@ -17,15 +17,18 @@
 package com.android.services.telephony.sip;
 
 import android.net.Uri;
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.telecom.AudioState;
 import android.telecom.Connection;
 import android.telecom.PhoneAccount;
+import android.telecom.TelecomManager;
 import android.util.Log;
 
 import com.android.internal.telephony.Call;
 import com.android.internal.telephony.CallStateException;
+import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.telephony.sip.SipPhone;
 import com.android.services.telephony.DisconnectCauseUtil;
 
@@ -64,6 +67,7 @@
                     null);
         }
         updateAddress();
+        setTechnologyTypeExtra();
         setInitialized();
     }
 
@@ -309,6 +313,17 @@
         }
     }
 
+    private void setTechnologyTypeExtra() {
+        int phoneType = PhoneConstants.PHONE_TYPE_SIP;
+        if (getExtras() == null) {
+            Bundle b = new Bundle();
+            b.putInt(TelecomManager.EXTRA_CALL_TECHNOLOGY_TYPE, phoneType);
+            setExtras(b);
+        } else {
+            getExtras().putInt(TelecomManager.EXTRA_CALL_TECHNOLOGY_TYPE, phoneType);
+        }
+    }
+
     /**
      * Determines the address for an incoming number.
      *