Example usage for android.media.tv TvInputManager TIME_SHIFT_INVALID_TIME

List of usage examples for android.media.tv TvInputManager TIME_SHIFT_INVALID_TIME

Introduction

In this page you can find the example usage for android.media.tv TvInputManager TIME_SHIFT_INVALID_TIME.

Prototype

long TIME_SHIFT_INVALID_TIME

To view the source code for android.media.tv TvInputManager TIME_SHIFT_INVALID_TIME.

Click Source Link

Document

Value returned by TvInputService.Session#onTimeShiftGetCurrentPosition() and TvInputService.Session#onTimeShiftGetStartPosition() when time shifting has not yet started.

Usage

From source file:com.android.tv.dvr.ui.DvrUiHelper.java

/**
 * Launches DVR playback activity for the give recorded program.
 *
 * @param programId the ID of the recorded program going to be played.
 * @param seekTimeMs the seek position to initial playback.
 * @param pinChecked {@code true} if the pin code for parental controls has already been
 *                   verified, otherwise {@code false}.
 *//*from w w  w  .  jav  a 2  s. c  o m*/
public static void startPlaybackActivity(Context context, long programId, long seekTimeMs, boolean pinChecked) {
    Intent intent = new Intent(context, DvrPlaybackActivity.class);
    intent.putExtra(Utils.EXTRA_KEY_RECORDED_PROGRAM_ID, programId);
    if (seekTimeMs != TvInputManager.TIME_SHIFT_INVALID_TIME) {
        intent.putExtra(Utils.EXTRA_KEY_RECORDED_PROGRAM_SEEK_TIME, seekTimeMs);
    }
    intent.putExtra(Utils.EXTRA_KEY_RECORDED_PROGRAM_PIN_CHECKED, pinChecked);
    context.startActivity(intent);
}