diff options
author | Hall Liu <hallliu@google.com> | 2016-03-07 14:13:10 -0800 |
---|---|---|
committer | Hall Liu <hallliu@google.com> | 2016-03-07 14:13:10 -0800 |
commit | 7877c7255268c34a71c7d1b4055afabb8fcba04c (patch) | |
tree | 5f8a75b56f9cf1d917a00d05f9b2f2421dbed932 /sip | |
parent | 6fe7f2525cdb33c8024229c9d6782a357814eeaf (diff) | |
download | android_packages_services_Telephony-7877c7255268c34a71c7d1b4055afabb8fcba04c.tar.gz android_packages_services_Telephony-7877c7255268c34a71c7d1b4055afabb8fcba04c.tar.bz2 android_packages_services_Telephony-7877c7255268c34a71c7d1b4055afabb8fcba04c.zip |
Add the call technology extra for SIP calls for analytics
Set the EXTRA_CALL_TECHNOLOGY_TYPE extra on SipConnection.
Bug: 27529579
Change-Id: I2288057f25a31ef04a716b9f11ac18ed38509ae3
Diffstat (limited to 'sip')
-rw-r--r-- | sip/src/com/android/services/telephony/sip/SipConnection.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sip/src/com/android/services/telephony/sip/SipConnection.java b/sip/src/com/android/services/telephony/sip/SipConnection.java index 0d8a6f857..b10ae568f 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 @@ final class SipConnection extends Connection { null); } updateAddress(); + setTechnologyTypeExtra(); setInitialized(); } @@ -309,6 +313,17 @@ final class SipConnection extends Connection { } } + 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. * |