Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae2d482d authored by moezbhatti's avatar moezbhatti
Browse files

Use tel: schema for glide handler

parent 18d8f241
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ class ContactImageLoader(
) : ModelLoader<String, InputStream> {

    override fun handles(model: String): Boolean {
        return phoneNumberUtils.isPossibleNumber(model)
        return model.startsWith("tel:")
    }

    override fun buildLoadData(
+2 −2
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ class NotificationManagerImpl @Inject constructor(
                person.setIcon(GlideApp.with(context)
                        .asBitmap()
                        .circleCrop()
                        .load(message.address)
                        .load("tel:${message.address}")
                        .submit(64.dpToPx(context), 64.dpToPx(context))
                        .let { futureGet -> tryOrNull(false) { futureGet.get() } }
                        ?.let(IconCompat::createWithBitmap))
@@ -182,7 +182,7 @@ class NotificationManagerImpl @Inject constructor(
                    GlideApp.with(context)
                            .asBitmap()
                            .circleCrop()
                            .load(address)
                            .load("tel:$address")
                            .submit(64.dpToPx(context), 64.dpToPx(context))
                }
                ?.let { futureGet -> tryOrNull(false) { futureGet.get() } }
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ class QkChooserTargetService : ChooserTargetService() {
                val request = GlideApp.with(this)
                        .asBitmap()
                        .circleCrop()
                        .load(address)
                        .load("tel:$address")
                        .submit()
                val bitmap = tryOrNull(false) { request.get() }

+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ class ShortcutManagerImpl @Inject constructor(
                val request = GlideApp.with(context)
                        .asBitmap()
                        .circleCrop()
                        .load(address)
                        .load("tel:$address")
                        .submit(shortcutManager.iconMaxWidth, shortcutManager.iconMaxHeight)
                val bitmap = tryOrNull(false) { request.get() }

+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ class AvatarView @JvmOverloads constructor(context: Context, attrs: AttributeSet
        photo.setImageDrawable(null)
        address?.let { address ->
            GlideApp.with(photo)
                    .load(address)
                    .load("tel:$address")
                    .signature(ObjectKey(lastUpdated ?: 0L))
                    .into(photo)
        }
Loading