Prevents useless log

This commit is contained in:
Sylvain Berfini 2022-06-01 13:29:25 +02:00
parent 6537e5fc23
commit fc99465fb9

View file

@ -22,6 +22,7 @@ package org.linphone.utils
import android.content.Context import android.content.Context
import android.graphics.* import android.graphics.*
import android.net.Uri import android.net.Uri
import java.io.FileNotFoundException
import org.linphone.compatibility.Compatibility import org.linphone.compatibility.Compatibility
import org.linphone.core.tools.Log import org.linphone.core.tools.Log
@ -36,6 +37,8 @@ class ImageUtils {
bm = try { bm = try {
// We make a copy to ensure Bitmap will be Software and not Hardware, required for shortcuts // We make a copy to ensure Bitmap will be Software and not Hardware, required for shortcuts
Compatibility.getBitmapFromUri(context, fromPictureUri).copy(Bitmap.Config.ARGB_8888, true) Compatibility.getBitmapFromUri(context, fromPictureUri).copy(Bitmap.Config.ARGB_8888, true)
} catch (fnfe: FileNotFoundException) {
return null
} catch (e: Exception) { } catch (e: Exception) {
Log.e("[Image Utils] Failed to get bitmap from URI [$fromPictureUri]: $e") Log.e("[Image Utils] Failed to get bitmap from URI [$fromPictureUri]: $e")
return null return null