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

Commit 1cc1c70a authored by Sanket Agarwal's avatar Sanket Agarwal
Browse files

Support Rewind and FF transport controls

- Mainly to support PTS use cases

Change-Id: If595d89f783c6bee4249fe5fc995ef2997eb2b0a
(cherry picked from commit 06e49168ecb62fd055399e5b53fd196a85bbfbce)
parent 5c84e273
Loading
Loading
Loading
Loading
+10 −15
Original line number Diff line number Diff line
@@ -256,25 +256,20 @@ public class A2dpMediaBrowserService extends MediaBrowserService {
                    .sendToTarget();
        }

        // These are not yet supported.
        @Override
        public void onCustomAction(String action, Bundle extras) {
            Log.d(TAG, "onCustomAction action=" + action + " extras=" + extras);
        }

        @Override
        public void onPlayFromSearch(String query, Bundle extras) {
            Log.d(TAG, "playFromSearch not supported in AVRCP");
        }

        @Override
        public void onCommand(String command, Bundle args, ResultReceiver cb) {
            Log.d(TAG, "onCommand command=" + command + " args=" + args);
        public void onRewind() {
            Log.d(TAG, "onRewind");
            mAvrcpCommandQueue.obtainMessage(
                MSG_AVRCP_PASSTHRU, AvrcpControllerService.PASS_THRU_CMD_ID_REWIND).sendToTarget();
            // TRACK_EVENT should be fired eventually and the UI should be hence updated.
        }

        @Override
        public void onSkipToQueueItem(long queueId) {
            Log.d(TAG, "onSkipToQueueItem");
        public void onFastForward() {
            Log.d(TAG, "onFastForward");
            mAvrcpCommandQueue.obtainMessage(
                MSG_AVRCP_PASSTHRU, AvrcpControllerService.PASS_THRU_CMD_ID_FF).sendToTarget();
            // TRACK_EVENT should be fired eventually and the UI should be hence updated.
        }

        @Override