Example usage for android.media.session PlaybackState ACTION_REWIND

List of usage examples for android.media.session PlaybackState ACTION_REWIND

Introduction

In this page you can find the example usage for android.media.session PlaybackState ACTION_REWIND.

Prototype

long ACTION_REWIND

To view the source code for android.media.session PlaybackState ACTION_REWIND.

Click Source Link

Document

Indicates this session supports the rewind command.

Usage

From source file:com.aengbee.android.leanback.ui.PlaybackOverlayCustomFragment.java

private long getAvailableActions(int nextState) {
    long actions = PlaybackState.ACTION_PLAY | PlaybackState.ACTION_PLAY_FROM_MEDIA_ID
            | PlaybackState.ACTION_PLAY_FROM_SEARCH | PlaybackState.ACTION_SKIP_TO_NEXT
            | PlaybackState.ACTION_SKIP_TO_PREVIOUS | PlaybackState.ACTION_FAST_FORWARD
            | PlaybackState.ACTION_REWIND | PlaybackState.ACTION_PAUSE;

    if (nextState == PlaybackState.STATE_PLAYING) {
        actions |= PlaybackState.ACTION_PAUSE;
    }/*from   w ww.ja  va 2s.  c  om*/

    return actions;
}