diff --git a/app/src/main/java/org/linphone/contacts/ContactsManager.kt b/app/src/main/java/org/linphone/contacts/ContactsManager.kt
index cfd2fcddf..724f0d819 100644
--- a/app/src/main/java/org/linphone/contacts/ContactsManager.kt
+++ b/app/src/main/java/org/linphone/contacts/ContactsManager.kt
@@ -414,6 +414,7 @@ class ContactsManager @UiThread constructor() {
val key = conferenceInfo.uri?.asStringUriOnly()
if (key == null) {
val fakeFriend = coreContext.core.createFriend()
+ fakeFriend.name = conferenceInfo.subject
return ContactAvatarModel(fakeFriend)
}
diff --git a/app/src/main/java/org/linphone/notifications/NotificationsManager.kt b/app/src/main/java/org/linphone/notifications/NotificationsManager.kt
index a2aa8ee10..d33424833 100644
--- a/app/src/main/java/org/linphone/notifications/NotificationsManager.kt
+++ b/app/src/main/java/org/linphone/notifications/NotificationsManager.kt
@@ -783,11 +783,19 @@ class NotificationsManager @MainThread constructor(private val context: Context)
val answerIntent = getCallAnswerPendingIntent(notifiable)
val remoteAddress = call.remoteAddress
+ val remoteContactAddress = call.remoteContactAddress
+ val conferenceInfo = if (remoteContactAddress != null) {
+ call.core.findConferenceInformationFromUri(remoteContactAddress) ?: call.callLog.conferenceInfo
+ } else {
+ call.callLog.conferenceInfo
+ }
val conference = call.conference
- val isConference = conference != null
+ val isConference = conference != null || conferenceInfo != null
- val caller = if (conference != null) {
- val subject = conference.subject ?: LinphoneUtils.getDisplayName(remoteAddress)
+ val caller = if (isConference) {
+ val subject = conferenceInfo?.subject ?: conference?.subject ?: LinphoneUtils.getDisplayName(
+ remoteAddress
+ )
Person.Builder()
.setName(subject)
.setIcon(
@@ -837,13 +845,10 @@ class NotificationsManager @MainThread constructor(private val context: Context)
)
}
- val channel = when (call.state) {
- Call.State.IncomingReceived, Call.State.IncomingEarlyMedia -> {
- context.getString(R.string.notification_channel_incoming_call_id)
- }
- else -> {
- context.getString(R.string.notification_channel_call_id)
- }
+ val channel = if (isIncoming) {
+ context.getString(R.string.notification_channel_incoming_call_id)
+ } else {
+ context.getString(R.string.notification_channel_call_id)
}
Log.i(
diff --git a/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt b/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt
index 92526b3b1..6b084dfcc 100644
--- a/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt
+++ b/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt
@@ -776,7 +776,13 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
callMediaEncryptionModel.update(call)
call.addListener(callListener)
- if (call.conference != null) {
+ val remoteContactAddress = call.remoteContactAddress
+ val conferenceInfo = if (remoteContactAddress != null) {
+ call.core.findConferenceInformationFromUri(remoteContactAddress)
+ } else {
+ call.callLog.conferenceInfo
+ }
+ if (call.conference != null || conferenceInfo != null) {
conferenceModel.configureFromCall(call)
goToConferenceEvent.postValue(Event(true))
} else {
@@ -828,7 +834,6 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
val address = call.remoteAddress
displayedAddress.postValue(LinphoneUtils.getAddressAsCleanStringUriOnly(address))
- val conferenceInfo = coreContext.core.findConferenceInformationFromUri(address)
val model = if (conferenceInfo != null) {
coreContext.contactsManager.getContactAvatarModelForConferenceInfo(conferenceInfo)
} else {
diff --git a/app/src/main/java/org/linphone/ui/main/history/model/CallLogModel.kt b/app/src/main/java/org/linphone/ui/main/history/model/CallLogModel.kt
index 0e5a59dd4..107b5d479 100644
--- a/app/src/main/java/org/linphone/ui/main/history/model/CallLogModel.kt
+++ b/app/src/main/java/org/linphone/ui/main/history/model/CallLogModel.kt
@@ -54,20 +54,18 @@ class CallLogModel @WorkerThread constructor(private val callLog: CallLog) {
wasConference = callLog.wasConference()
if (wasConference) {
- val conferenceInfo = coreContext.core.findConferenceInformationFromUri(address)
+ val conferenceInfo = callLog.conferenceInfo
if (conferenceInfo != null) {
avatarModel = coreContext.contactsManager.getContactAvatarModelForConferenceInfo(
conferenceInfo
)
} else {
+ Log.w("$TAG Failed to retrieve conference info attached to call log!")
val fakeFriend = coreContext.core.createFriend()
fakeFriend.address = address
fakeFriend.name = LinphoneUtils.getDisplayName(address)
avatarModel = ContactAvatarModel(fakeFriend)
avatarModel.forceConferenceIcon.postValue(true)
- Log.w(
- "$TAG Call log was conference but failed to find matching conference info from it's URI!"
- )
}
friendRefKey = null
diff --git a/app/src/main/res/layout/call_conference_active_speaker_cell.xml b/app/src/main/res/layout/call_conference_active_speaker_cell.xml
index 50826b524..e35120d99 100644
--- a/app/src/main/res/layout/call_conference_active_speaker_cell.xml
+++ b/app/src/main/res/layout/call_conference_active_speaker_cell.xml
@@ -27,7 +27,6 @@
android:id="@+id/avatar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
android:visibility="@{model.isSendingVideo || model.isJoining || !model.isInConference ? View.GONE : View.VISIBLE}"
layout="@layout/contact_avatar_medium"
bind:model="@{model.avatarModel}"
@@ -120,15 +119,19 @@
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>