mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-23 01:18:30 +00:00
Not needed
This commit is contained in:
parent
ee8779cc00
commit
51179c083c
2 changed files with 7 additions and 11 deletions
|
|
@ -25,6 +25,7 @@ import android.content.Context
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.database.Cursor
|
import android.database.Cursor
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
|
import android.graphics.BitmapFactory
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.provider.ContactsContract
|
import android.provider.ContactsContract
|
||||||
import androidx.annotation.UiThread
|
import androidx.annotation.UiThread
|
||||||
|
|
@ -300,10 +301,7 @@ class ContactsManager @UiThread constructor(context: Context) {
|
||||||
|
|
||||||
val photo = account?.params?.pictureUri.orEmpty()
|
val photo = account?.params?.pictureUri.orEmpty()
|
||||||
val bm: Bitmap? = if (photo.isNotEmpty()) {
|
val bm: Bitmap? = if (photo.isNotEmpty()) {
|
||||||
ImageUtils.getRoundBitmapFromUri(
|
BitmapFactory.decodeFile(photo)
|
||||||
coreContext.context,
|
|
||||||
Uri.parse(photo ?: "")
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
@ -332,10 +330,7 @@ fun Friend.getPerson(): Person {
|
||||||
val personBuilder = Person.Builder().setName(name)
|
val personBuilder = Person.Builder().setName(name)
|
||||||
|
|
||||||
val bm: Bitmap? = if (!photo.isNullOrEmpty()) {
|
val bm: Bitmap? = if (!photo.isNullOrEmpty()) {
|
||||||
ImageUtils.getRoundBitmapFromUri(
|
BitmapFactory.decodeFile(photo)
|
||||||
coreContext.context,
|
|
||||||
Uri.parse(photo ?: "")
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ import android.content.Intent
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.content.pm.ServiceInfo
|
import android.content.pm.ServiceInfo
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
|
import android.graphics.BitmapFactory
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.annotation.AnyThread
|
import androidx.annotation.AnyThread
|
||||||
import androidx.annotation.MainThread
|
import androidx.annotation.MainThread
|
||||||
|
|
@ -490,7 +491,7 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
||||||
coreContext.contactsManager.findContactByAddress(address)
|
coreContext.contactsManager.findContactByAddress(address)
|
||||||
val contactPicture = contact?.photo
|
val contactPicture = contact?.photo
|
||||||
val roundPicture = if (!contactPicture.isNullOrEmpty()) {
|
val roundPicture = if (!contactPicture.isNullOrEmpty()) {
|
||||||
ImageUtils.getRoundBitmapFromUri(context, Uri.parse(contactPicture))
|
BitmapFactory.decodeFile(contactPicture)
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
@ -592,7 +593,7 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
||||||
coreContext.contactsManager.findContactByAddress(message.fromAddress)
|
coreContext.contactsManager.findContactByAddress(message.fromAddress)
|
||||||
val contactPicture = contact?.photo
|
val contactPicture = contact?.photo
|
||||||
val roundPicture = if (!contactPicture.isNullOrEmpty()) {
|
val roundPicture = if (!contactPicture.isNullOrEmpty()) {
|
||||||
ImageUtils.getRoundBitmapFromUri(context, Uri.parse(contactPicture))
|
BitmapFactory.decodeFile(contactPicture)
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
@ -650,7 +651,7 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
||||||
coreContext.contactsManager.findContactByAddress(call.remoteAddress)
|
coreContext.contactsManager.findContactByAddress(call.remoteAddress)
|
||||||
val contactPicture = contact?.photo
|
val contactPicture = contact?.photo
|
||||||
val roundPicture = if (!contactPicture.isNullOrEmpty()) {
|
val roundPicture = if (!contactPicture.isNullOrEmpty()) {
|
||||||
ImageUtils.getRoundBitmapFromUri(context, Uri.parse(contactPicture))
|
BitmapFactory.decodeFile(contactPicture)
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue