Skip to content
Commit 364d250f authored by Sahana Rao's avatar Sahana Rao
Browse files

Fail silently on MediaScannerConnection#onScanCompleted

MediaScannerConnection#onScanCompleted callback runs on background
thread. Exception on the callback kills the process. To avoid this,
ignore exceptions from callback for apps targeting Q or lower.

This change fixes change in behavior from refactoring
Ie959daa7576214024150faf84b44cdba00119257 where errors on the callback
was handled on a binder thread that doesn't cause process crash.

Test: atest frameworks/base/media/ directory
Test: "in.mohalla.sharechat" app doesn't crash while sharing video.
Test: "com.vkontakte.android" app doesn't crash while sending a photo.
Bug: 147998630
Bug: 148925602
Change-Id: I5bd5f9fc22ac274da4d09c55dd639a6cca08be9b
parent 1527beb3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment