Leverage on Bitmap stored in ContactsManager to prevent decoding it from resource each time

This commit is contained in:
Sylvain Berfini 2023-01-12 17:24:17 +01:00
parent 5491401e0a
commit 8c7d8598ac
2 changed files with 3 additions and 3 deletions

View file

@ -182,7 +182,7 @@ class Api26Compatibility {
contact = null
displayName = conferenceInfo.subject ?: context.getString(R.string.conference)
address = LinphoneUtils.getDisplayableAddress(conferenceInfo.organizer)
roundPicture = BitmapFactory.decodeResource(context.resources, R.drawable.voip_multiple_contacts_avatar_alt)
roundPicture = coreContext.contactsManager.groupBitmap
info = context.getString(R.string.incoming_group_call_notification_title)
Log.i("[Notifications Manager] Displaying incoming group call notification with subject $displayName for remote contact address $remoteContact")
}
@ -253,7 +253,7 @@ class Api26Compatibility {
person = notificationsManager.getPerson(contact, displayName, roundPicture)
} else {
title = conferenceInfo.subject ?: context.getString(R.string.conference)
roundPicture = BitmapFactory.decodeResource(context.resources, R.drawable.voip_multiple_contacts_avatar_alt)
roundPicture = coreContext.contactsManager.groupBitmap
person = Person.Builder()
.setName(title)
.setIcon(IconCompat.createWithBitmap(roundPicture))

View file

@ -69,7 +69,7 @@ class XiaomiCompatibility {
contact = null
displayName = conferenceInfo.subject ?: context.getString(R.string.conference)
address = LinphoneUtils.getDisplayableAddress(conferenceInfo.organizer)
roundPicture = BitmapFactory.decodeResource(context.resources, R.drawable.voip_multiple_contacts_avatar_alt)
roundPicture = coreContext.contactsManager.groupBitmap
info = context.getString(R.string.incoming_group_call_notification_title)
Log.i("[Notifications Manager] Displaying incoming group call notification with subject $displayName and remote contact address $remoteContact")
}