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
Loading
Please register or sign in to comment