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

Commit 562d3d52 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Detach on download pending with no results, don't send null" into main

parents 9736a04d 5af9dd3f
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -230,14 +230,16 @@ public class BluetoothMediaBrowserService extends MediaBrowserServiceCompat {
        if (DBG) Log.d(TAG, "onLoadChildren parentMediaId= " + parentMediaId);
        BrowseResult contents = getContents(parentMediaId);
        byte status = contents.getStatus();
        if (status == BrowseResult.DOWNLOAD_PENDING && contents == null) {
            Log.i(TAG, "Download pending - no contents, id= " + parentMediaId);
        List<MediaItem> results = contents.getResults();
        if (status == BrowseResult.DOWNLOAD_PENDING && results == null) {
            Log.i(TAG, "Download pending - no results, id= " + parentMediaId);
            result.detach();
        } else {
            if (DBG) {
                Log.d(TAG, "id= " + parentMediaId + ", status= " + contents.getStatusString());
                Log.d(TAG, "id= " + parentMediaId + ", status= " + contents.getStatusString()
                        + ", results=" + results);
            }
            result.sendResult(contents.getResults());
            result.sendResult(results);
        }
    }