Media - Fix sysui crash on media image load

Apps may throw various RuntimeExceptions when requesting a bitmap load
over binder. Catch these so sysui doesn't crash loop.

Fixes: 166647431
Test: use DoubleTwist app
Change-Id: I7918768559afd3cc6c2f77922e1679d09859337d
This commit is contained in:
Matt Pietal
2020-08-31 11:22:25 -04:00
parent bd3af96cb7
commit 5009abe8e8

View File

@@ -562,7 +562,10 @@ class MediaDataManager(
decoder, info, source -> decoder.isMutableRequired = true
}
} catch (e: IOException) {
e.printStackTrace()
Log.e(TAG, "Unable to load bitmap", e)
null
} catch (e: RuntimeException) {
Log.e(TAG, "Unable to load bitmap", e)
null
}
}