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

Commit 8c95350d authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Gerrit Code Review
Browse files

Merge "AVRCP Controller getFolderItems"

parents e2c79f8f c11bd0ce
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -564,21 +564,21 @@ class AvrcpControllerStateMachine extends StateMachine {
        }

        private void fetchContents(BrowseTree.BrowseNode target) {
            int start = target.getChildrenCount();
            int end = Math.min(target.getExpectedChildren(), target.getChildrenCount()
                            + GET_FOLDER_ITEMS_PAGINATION_SIZE) - 1;
            switch (target.getScope()) {
                case AvrcpControllerService.BROWSE_SCOPE_PLAYER_LIST:
                    AvrcpControllerService.getPlayerListNative(mRemoteDevice.getBluetoothAddress(),
                            0, 255);
                            start, end);
                    break;
                case AvrcpControllerService.BROWSE_SCOPE_NOW_PLAYING:
                    AvrcpControllerService.getNowPlayingListNative(
                            mRemoteDevice.getBluetoothAddress(), target.getChildrenCount(),
                            Math.min(target.getExpectedChildren(), target.getChildrenCount()
                            + GET_FOLDER_ITEMS_PAGINATION_SIZE - 1));
                            mRemoteDevice.getBluetoothAddress(), start, end);
                    break;
                case AvrcpControllerService.BROWSE_SCOPE_VFS:
                    AvrcpControllerService.getFolderListNative(mRemoteDevice.getBluetoothAddress(),
                            target.getChildrenCount(), Math.min(target.getExpectedChildren(),
                                target.getChildrenCount() + GET_FOLDER_ITEMS_PAGINATION_SIZE - 1));
                            start, end);
                    break;
                default:
                    Log.e(STATE_TAG, "Scope " + target.getScope() + " cannot be handled here.");
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ public class BrowseTree {
        mRootNode = new BrowseNode(new MediaItem(new MediaDescription.Builder().setExtras(mdBundle)
              .setMediaId(ROOT).setTitle(ROOT).build(), MediaItem.FLAG_BROWSABLE));
        mRootNode.mBrowseScope = AvrcpControllerService.BROWSE_SCOPE_PLAYER_LIST;
        mRootNode.setExpectedChildren(255);

        Bundle upnodeBundle = new Bundle();
        upnodeBundle.putString(AvrcpControllerService.MEDIA_ITEM_UID_KEY, UP);