Example usage for android.media.session PlaybackState STATE_NONE

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

Introduction

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

Prototype

int STATE_NONE

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

Click Source Link

Document

This is the default playback state and indicates that no media has been added yet, or the performer has been reset and has no content to play.

Usage

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

private void pause() {
    mPauseTransient = false;//  ww w .j a  va 2 s.  c  om

    if (mPlayer == null) {
        setPlaybackState(PlaybackState.STATE_NONE);
        return;
    }
    if (mGlue.isMediaPlaying()) {
        mPlayer.getPlayerControl().pause();
        setPlaybackState(PlaybackState.STATE_PAUSED);
    }
}

From source file:org.mythtv.android.presentation.view.fragment.TvPlaybackOverlayFragment.java

private int getPlaybackState() {

    Activity activity = getActivity();/*from  w w  w.  ja va 2s .  c  om*/

    if (activity != null) {

        PlaybackState state = activity.getMediaController().getPlaybackState();
        if (state != null) {

            return state.getState();
        } else {

            return PlaybackState.STATE_NONE;
        }
    }

    return PlaybackState.STATE_NONE;
}

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

private int getPlaybackState() {
    Activity activity = getActivity();/*from   ww w.j  a va 2  s.  c  o  m*/

    if (activity != null) {
        PlaybackState state = activity.getMediaController().getPlaybackState();
        if (state != null) {
            return state.getState();
        } else {
            return PlaybackState.STATE_NONE;
        }
    }
    return PlaybackState.STATE_NONE;
}