Log album art exceptions

This commit is contained in:
MM20 2022-08-30 16:05:08 +02:00
parent 20255b281d
commit 5c8df75ad3
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 4 additions and 0 deletions

View File

@ -44,5 +44,6 @@ dependencies {
implementation(project(":ktx"))
implementation(project(":preferences"))
implementation(project(":notifications"))
implementation(project(":crashreporter"))
}

View File

@ -22,6 +22,7 @@ import androidx.core.graphics.drawable.toBitmap
import coil.imageLoader
import coil.request.ImageRequest
import coil.size.Scale
import de.mm20.launcher2.crashreporter.CrashReporter
import de.mm20.launcher2.notifications.NotificationRepository
import de.mm20.launcher2.preferences.LauncherDataStore
import kotlinx.coroutines.*
@ -303,7 +304,9 @@ internal class MusicRepositoryImpl(
.build()
context.imageLoader.execute(request).drawable?.toBitmap()
} catch (e: IOException) {
CrashReporter.logException(e)
} catch (e: SecurityException) {
CrashReporter.logException(e)
}
return null
}