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

Commit f8f8205a authored by Kai Wang's avatar Kai Wang Committed by Gerrit Code Review
Browse files

Merge "AVRCP controller browse"

parents e5a629f1 9a392bea
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -359,8 +359,9 @@ public class A2dpMediaBrowserService extends MediaBrowserService {
                        intent.getParcelableExtra(AvrcpControllerService.EXTRA_PLAYBACK);
                MediaMetadata mmd =
                        intent.getParcelableExtra(AvrcpControllerService.EXTRA_METADATA);
                mAvrcpCommandQueue.obtainMessage(
                    MSG_TRACK, new Pair<PlaybackState, MediaMetadata>(pbb, mmd)).sendToTarget();
                mAvrcpCommandQueue
                        .obtainMessage(MSG_TRACK, new Pair<PlaybackState, MediaMetadata>(pbb, mmd))
                        .sendToTarget();
            } else if (AvrcpControllerService.ACTION_FOLDER_LIST.equals(action)) {
                mAvrcpCommandQueue.obtainMessage(MSG_FOLDER_LIST, intent).sendToTarget();
            }
@@ -432,6 +433,8 @@ public class A2dpMediaBrowserService extends MediaBrowserService {
        // Set device to null.
        mA2dpDevice = null;
        mBrowseConnected = false;
        // update playerList.
        notifyChildrenChanged("__ROOT__");
    }

    private void msgTrack(PlaybackState pb, MediaMetadata mmd) {
@@ -506,6 +509,8 @@ public class A2dpMediaBrowserService extends MediaBrowserService {
            return;
        }
        mBrowseConnected = true;
        // update playerList
        notifyChildrenChanged("__ROOT__");
    }

    private void msgFolderList(Intent intent) {
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ public class AvrcpControllerService extends ProfileService {
    public synchronized boolean getChildren(
            BluetoothDevice device, String parentMediaId, int start, int items) {
        if (DBG) {
            Log.d(TAG, "getChildrent device = " + device + " parent " + parentMediaId);
            Log.d(TAG, "getChildren device = " + device + " parent " + parentMediaId);
        }

        if (device == null) {