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

Commit e3dd5fbd authored by Kai Wang's avatar Kai Wang Committed by android-build-merger
Browse files

Merge "AVRCP controller browse"

am: f8f8205a

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


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


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


        if (device == null) {
        if (device == null) {