Skip to content
Snippets Groups Projects
Commit 3ed359bd authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Catch exception in case bitmap fails to parcelize

(cherry picked from commit 85aac906)
parent 54828d7f
No related branches found
No related tags found
No related merge requests found
......@@ -2689,21 +2689,22 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
registerMedialibrary(new Runnable() {
@Override
public void run() {
VLCApplication.runBackground(new Runnable() {
@Override
public void run() {
result.sendResult(BrowserProvider.browse(parentId));
}
});
sendResults(result, parentId);
}
});
else
VLCApplication.runBackground(new Runnable() {
@Override
public void run() {
sendResults(result, parentId);
}
private void sendResults(@NonNull final MediaBrowserServiceCompat.Result result, @NonNull final String parentId) {
VLCApplication.runBackground(new Runnable() {
@Override
public void run() {
try {
result.sendResult(BrowserProvider.browse(parentId));
}
});
} catch (RuntimeException ignored) {} //bitmap parcelization can fail
}
});
}
private class MedialibraryReceiver extends BroadcastReceiver {
......
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