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

Skip to content
Commit 2fe3af04 authored by Sal Savage's avatar Sal Savage
Browse files

Keep Media Framework/Bitmap exceptions from crashing Bluetooth

In some rare cases, Media Framework classes can fail to unparcel and
throw a runtime exception. These result in the calling application
crashing, whether its Bluetooth, the Notification Bar, etc.

This change wraps our calls to access the Media Framework classes' data
in try-catch blocks and returns empty data/empty lists when something
goes wrong. We're logging an error message and the paired exception when
it happens as well so we can still monitor for the problem.

This means the remote device will see the default "Not Provided" when
something goes wrong with the current track, and an empty queue or
folder when something goes wrong with the browsed items.

This is not meant to be the final solution, only a stand in to prevent
crashes until a formal solution can be determined in the framework we're
calling into.

Tag: #stability
Bug: 191525560
Test: atest BluetoothInstrumentationTests
Change-Id: I82d006decd49032c9d166810e20f129538b106e3
parent 150dd7d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment