Wrap mirror links result in try/catch.
This seems to be racy on the receiver side and i have no real way to test it :-/
This commit is contained in:
parent
b07293f968
commit
2666afd234
@ -383,10 +383,14 @@ public class MirrorLinkMediaBrowserService extends MediaBrowserService
|
||||
List<MediaBrowser.MediaItem> items = null;
|
||||
if (result != null) {
|
||||
items = mQueryResult;
|
||||
if (current == ASYNCTASK_SUCCEEDED) {
|
||||
result.sendResult(items);
|
||||
} else {
|
||||
result.sendResult(Collections.<MediaItem>emptyList());
|
||||
try {
|
||||
if (current == ASYNCTASK_SUCCEEDED) {
|
||||
result.sendResult(items);
|
||||
} else {
|
||||
result.sendResult(Collections.<MediaItem>emptyList());
|
||||
}
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
Log.v("VanillaMusic", "result.send failed: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user