Do not display GRUU of call's remote address
This commit is contained in:
parent
8b60d5eda1
commit
2e327ac30d
5 changed files with 10 additions and 6 deletions
|
@ -35,7 +35,7 @@ open class CallData(val call: Call) : GenericContactData(call.remoteAddress) {
|
||||||
fun onShowContextMenu(anchor: View, callData: CallData)
|
fun onShowContextMenu(anchor: View, callData: CallData)
|
||||||
}
|
}
|
||||||
|
|
||||||
val address = call.remoteAddress.asStringUriOnly()
|
val displayableAddress = MutableLiveData<String>()
|
||||||
|
|
||||||
val isPaused = MutableLiveData<Boolean>()
|
val isPaused = MutableLiveData<Boolean>()
|
||||||
val isRemotelyPaused = MutableLiveData<Boolean>()
|
val isRemotelyPaused = MutableLiveData<Boolean>()
|
||||||
|
@ -90,6 +90,10 @@ open class CallData(val call: Call) : GenericContactData(call.remoteAddress) {
|
||||||
call.addListener(listener)
|
call.addListener(listener)
|
||||||
isRemotelyRecorded.value = call.remoteParams?.isRecording
|
isRemotelyRecorded.value = call.remoteParams?.isRecording
|
||||||
|
|
||||||
|
val clone = call.remoteAddress.clone()
|
||||||
|
clone.clean() // To remove GRUU if any
|
||||||
|
displayableAddress.value = clone.asStringUriOnly()
|
||||||
|
|
||||||
update()
|
update()
|
||||||
// initChatRoom()
|
// initChatRoom()
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
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_constraintBottom_toTopOf="@id/buttons"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
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_constraintBottom_toTopOf="@id/buttons"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
style="@style/call_list_active_sip_uri_font"
|
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>
|
</LinearLayout>
|
||||||
<!-- Data binding doesn't work on styles... :'( -->
|
<!-- Data binding doesn't work on styles... :'( -->
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
style="@style/call_list_sip_uri_font"
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
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_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/remote_name" />
|
app:layout_constraintTop_toBottomOf="@id/remote_name" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue