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

Commit 5f29f638 authored by Sanket Agarwal's avatar Sanket Agarwal Committed by android-build-merger
Browse files

Support Rewind and FF transport controls

am: 827955c0

Change-Id: If55017dafbc03cb25528eadb4209b875fea5f8cf
parents a7b76a47 827955c0
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