Do not display GRUU of call's remote address

This commit is contained in:
Sylvain Berfini 2022-03-30 17:29:20 +02:00
parent 8b60d5eda1
commit 2e327ac30d
5 changed files with 10 additions and 6 deletions

View file

@ -35,7 +35,7 @@ open class CallData(val call: Call) : GenericContactData(call.remoteAddress) {
fun onShowContextMenu(anchor: View, callData: CallData)
}
val address = call.remoteAddress.asStringUriOnly()
val displayableAddress = MutableLiveData<String>()
val isPaused = MutableLiveData<Boolean>()
val isRemotelyPaused = MutableLiveData<Boolean>()
@ -90,6 +90,10 @@ open class CallData(val call: Call) : GenericContactData(call.remoteAddress) {
call.addListener(listener)
isRemotelyRecorded.value = call.remoteParams?.isRecording
val clone = call.remoteAddress.clone()
clone.clean() // To remove GRUU if any
displayableAddress.value = clone.asStringUriOnly()
update()
// initChatRoom()

View file

@ -94,7 +94,7 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="@{callsViewModel.currentCallData.address, default=`sip:bilbo.baggins@sip.linphone.org`}"
android:text="@{callsViewModel.currentCallData.displayableAddress, default=`sip:bilbo.baggins@sip.linphone.org`}"
app:layout_constraintBottom_toTopOf="@id/buttons"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View file

@ -90,7 +90,7 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="@{callsViewModel.currentCallData.remoteConferenceSubject.length > 0 ? @string/conference : callsViewModel.currentCallData.address, default=`sip:bilbo.baggins@sip.linphone.org`}"
android:text="@{callsViewModel.currentCallData.remoteConferenceSubject.length > 0 ? @string/conference : callsViewModel.currentCallData.displayableAddress, default=`sip:bilbo.baggins@sip.linphone.org`}"
app:layout_constraintBottom_toTopOf="@id/buttons"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View file

@ -84,7 +84,7 @@
android:maxLines="1"
android:ellipsize="end"
style="@style/call_list_active_sip_uri_font"
android:text="@{data.address, default=`bilbo.baggins@sip.linphone.org`}"/>
android:text="@{data.displayableAddress, default=`bilbo.baggins@sip.linphone.org`}"/>
</LinearLayout>
<!-- Data binding doesn't work on styles... :'( -->
@ -120,7 +120,7 @@
android:maxLines="1"
android:ellipsize="end"
style="@style/call_list_sip_uri_font"
android:text="@{data.address, default=`bilbo.baggins@sip.linphone.org`}"/>
android:text="@{data.displayableAddress, default=`bilbo.baggins@sip.linphone.org`}"/>
</LinearLayout>

View file

@ -76,7 +76,7 @@
android:layout_marginStart="10dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@{callsViewModel.currentCallData.address, default=`sip:johndoe@sip.linphone.org`}"
android:text="@{callsViewModel.currentCallData.displayableAddress, default=`sip:johndoe@sip.linphone.org`}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/remote_name" />