Merge "Unhide timeshift apis"

This commit is contained in:
David Zhao
2023-02-13 21:47:59 +00:00
committed by Android (Google) Code Review
6 changed files with 102 additions and 52 deletions

View File

@@ -27162,6 +27162,10 @@ package android.media.tv {
field public static final int SIGNAL_STRENGTH_STRONG = 3; // 0x3
field public static final int SIGNAL_STRENGTH_WEAK = 2; // 0x2
field public static final long TIME_SHIFT_INVALID_TIME = -9223372036854775808L; // 0x8000000000000000L
field public static final int TIME_SHIFT_MODE_AUTO = 4; // 0x4
field public static final int TIME_SHIFT_MODE_LOCAL = 2; // 0x2
field public static final int TIME_SHIFT_MODE_NETWORK = 3; // 0x3
field public static final int TIME_SHIFT_MODE_OFF = 1; // 0x1
field public static final int TIME_SHIFT_STATUS_AVAILABLE = 3; // 0x3
field public static final int TIME_SHIFT_STATUS_UNAVAILABLE = 2; // 0x2
field public static final int TIME_SHIFT_STATUS_UNKNOWN = 0; // 0x0
@@ -27246,11 +27250,14 @@ package android.media.tv {
method public void notifyAitInfoUpdated(@NonNull android.media.tv.AitInfo);
method public void notifyAudioPresentationChanged(@NonNull java.util.List<android.media.AudioPresentation>);
method public void notifyAudioPresentationSelected(int, int);
method public void notifyAvailableSpeeds(@NonNull float[]);
method public void notifyBroadcastInfoResponse(@NonNull android.media.tv.BroadcastInfoResponse);
method public void notifyChannelRetuned(android.net.Uri);
method public void notifyContentAllowed();
method public void notifyContentBlocked(@NonNull android.media.tv.TvContentRating);
method public void notifyCueingMessageAvailability(boolean);
method public void notifySignalStrength(int);
method public void notifyTimeShiftMode(int);
method public void notifyTimeShiftStatusChanged(int);
method public void notifyTrackSelected(int, String);
method public void notifyTracksChanged(java.util.List<android.media.tv.TvTrackInfo>);
@@ -27285,6 +27292,7 @@ package android.media.tv {
method public void onTimeShiftPlay(android.net.Uri);
method public void onTimeShiftResume();
method public void onTimeShiftSeekTo(long);
method public void onTimeShiftSetMode(int);
method public void onTimeShiftSetPlaybackParams(android.media.PlaybackParams);
method public boolean onTouchEvent(android.view.MotionEvent);
method public boolean onTrackballEvent(android.view.MotionEvent);
@@ -27424,6 +27432,7 @@ package android.media.tv {
method public void timeShiftPlay(String, android.net.Uri);
method public void timeShiftResume();
method public void timeShiftSeekTo(long);
method public void timeShiftSetMode(int);
method public void timeShiftSetPlaybackParams(@NonNull android.media.PlaybackParams);
method public void tune(@NonNull String, android.net.Uri);
method public void tune(String, android.net.Uri, android.os.Bundle);
@@ -27444,12 +27453,15 @@ package android.media.tv {
method public void onAitInfoUpdated(@NonNull String, @NonNull android.media.tv.AitInfo);
method public void onAudioPresentationSelected(@NonNull String, int, int);
method public void onAudioPresentationsChanged(@NonNull String, @NonNull java.util.List<android.media.AudioPresentation>);
method public void onAvailableSpeeds(@NonNull String, @NonNull float[]);
method public void onChannelRetuned(String, android.net.Uri);
method public void onConnectionFailed(String);
method public void onContentAllowed(String);
method public void onContentBlocked(String, android.media.tv.TvContentRating);
method public void onCueingMessageAvailability(@NonNull String, boolean);
method public void onDisconnected(String);
method public void onSignalStrengthUpdated(@NonNull String, int);
method public void onTimeShiftMode(@NonNull String, int);
method public void onTimeShiftStatusChanged(String, int);
method public void onTrackSelected(String, int, String);
method public void onTracksChanged(String, java.util.List<android.media.tv.TvTrackInfo>);
@@ -27531,7 +27543,11 @@ package android.media.tv.interactive {
field public static final String COMMAND_PARAMETER_KEY_CHANGE_CHANNEL_QUIETLY = "command_change_channel_quietly";
field public static final String COMMAND_PARAMETER_KEY_CHANNEL_URI = "command_channel_uri";
field public static final String COMMAND_PARAMETER_KEY_INPUT_ID = "command_input_id";
field public static final String COMMAND_PARAMETER_KEY_PLAYBACK_PARAMS = "command_playback_params";
field public static final String COMMAND_PARAMETER_KEY_PROGRAM_URI = "command_program_uri";
field public static final String COMMAND_PARAMETER_KEY_STOP_MODE = "command_stop_mode";
field public static final String COMMAND_PARAMETER_KEY_TIME_POSITION = "command_time_position";
field public static final String COMMAND_PARAMETER_KEY_TIME_SHIFT_MODE = "command_time_shift_mode";
field public static final String COMMAND_PARAMETER_KEY_TRACK_ID = "command_track_id";
field public static final String COMMAND_PARAMETER_KEY_TRACK_TYPE = "command_track_type";
field public static final String COMMAND_PARAMETER_KEY_VOLUME = "command_volume";
@@ -27545,6 +27561,12 @@ package android.media.tv.interactive {
field public static final String PLAYBACK_COMMAND_TYPE_TUNE_PREV = "tune_previous";
field public static final String SERVICE_INTERFACE = "android.media.tv.interactive.TvInteractiveAppService";
field public static final String SERVICE_META_DATA = "android.media.tv.interactive.app";
field public static final String TIME_SHIFT_COMMAND_TYPE_PAUSE = "pause";
field public static final String TIME_SHIFT_COMMAND_TYPE_PLAY = "play";
field public static final String TIME_SHIFT_COMMAND_TYPE_RESUME = "resume";
field public static final String TIME_SHIFT_COMMAND_TYPE_SEEK_TO = "seek_to";
field public static final String TIME_SHIFT_COMMAND_TYPE_SET_MODE = "set_mode";
field public static final String TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS = "set_playback_params";
}
public abstract static class TvInteractiveAppService.Session implements android.view.KeyEvent.Callback {
@@ -27557,6 +27579,7 @@ package android.media.tv.interactive {
method @CallSuper public final void notifyTeletextAppStateChanged(int);
method public void onAdBufferConsumed(@NonNull android.media.tv.AdBuffer);
method public void onAdResponse(@NonNull android.media.tv.AdResponse);
method public void onAvailableSpeeds(@NonNull float[]);
method public void onBroadcastInfoResponse(@NonNull android.media.tv.BroadcastInfoResponse);
method public void onContentAllowed();
method public void onContentBlocked(@NonNull android.media.tv.TvContentRating);
@@ -27586,6 +27609,11 @@ package android.media.tv.interactive {
method public void onStopInteractiveApp();
method public void onStreamVolume(float);
method public void onSurfaceChanged(int, int, int);
method public void onTimeShiftCurrentPositionChanged(@NonNull String, long);
method public void onTimeShiftMode(int);
method public void onTimeShiftPlaybackParams(@NonNull android.media.PlaybackParams);
method public void onTimeShiftStartPositionChanged(@NonNull String, long);
method public void onTimeShiftStatusChanged(@NonNull String, int);
method public boolean onTouchEvent(@NonNull android.view.MotionEvent);
method public void onTrackInfoList(@NonNull java.util.List<android.media.tv.TvTrackInfo>);
method public void onTrackSelected(int, @NonNull String);
@@ -27599,6 +27627,7 @@ package android.media.tv.interactive {
method public void onVideoUnavailable(int);
method @CallSuper public void removeBroadcastInfo(int);
method @CallSuper public void requestAd(@NonNull android.media.tv.AdRequest);
method @CallSuper public void requestAvailableSpeeds();
method @CallSuper public void requestBroadcastInfo(@NonNull android.media.tv.BroadcastInfoRequest);
method @CallSuper public void requestCurrentChannelLcn();
method @CallSuper public void requestCurrentChannelUri();
@@ -27608,10 +27637,12 @@ package android.media.tv.interactive {
method @CallSuper public void requestStartRecording(@Nullable android.net.Uri);
method @CallSuper public void requestStopRecording(@NonNull String);
method @CallSuper public void requestStreamVolume();
method @CallSuper public void requestTimeShiftMode();
method @CallSuper public void requestTrackInfoList();
method @CallSuper public void requestTvRecordingInfo(@NonNull String);
method @CallSuper public void requestTvRecordingInfoList(@NonNull int);
method @CallSuper public void sendPlaybackCommandRequest(@NonNull String, @Nullable android.os.Bundle);
method @CallSuper public void sendTimeShiftCommandRequest(@NonNull String, @Nullable android.os.Bundle);
method @CallSuper public void setMediaViewEnabled(boolean);
method @CallSuper public void setTvRecordingInfo(@NonNull String, @NonNull android.media.tv.TvRecordingInfo);
method @CallSuper public void setVideoBounds(@NonNull android.graphics.Rect);
@@ -27643,6 +27674,10 @@ package android.media.tv.interactive {
method public void notifyError(@NonNull String, @NonNull android.os.Bundle);
method public void notifyRecordingStarted(@NonNull String);
method public void notifyRecordingStopped(@NonNull String);
method public void notifyTimeShiftCurrentPositionChanged(@NonNull String, long);
method public void notifyTimeShiftPlaybackParams(@NonNull android.media.PlaybackParams);
method public void notifyTimeShiftStartPositionChanged(@NonNull String, long);
method public void notifyTimeShiftStatusChanged(@NonNull String, int);
method public void notifyTvMessage(@NonNull String, @NonNull android.os.Bundle);
method public void onAttachedToWindow();
method public void onDetachedFromWindow();
@@ -27653,12 +27688,14 @@ package android.media.tv.interactive {
method public void prepareInteractiveApp(@NonNull String, int);
method public void reset();
method public void resetInteractiveApp();
method public void sendAvailableSpeeds(@NonNull float[]);
method public void sendCurrentChannelLcn(int);
method public void sendCurrentChannelUri(@Nullable android.net.Uri);
method public void sendCurrentTvInputId(@Nullable String);
method public void sendCurrentVideoBounds(@NonNull android.graphics.Rect);
method public void sendSigningResult(@NonNull String, @NonNull byte[]);
method public void sendStreamVolume(float);
method public void sendTimeShiftMode(int);
method public void sendTrackInfoList(@Nullable java.util.List<android.media.tv.TvTrackInfo>);
method public void sendTvRecordingInfo(@Nullable android.media.tv.TvRecordingInfo);
method public void sendTvRecordingInfoList(@NonNull java.util.List<android.media.tv.TvRecordingInfo>);
@@ -27684,6 +27721,7 @@ package android.media.tv.interactive {
ctor public TvInteractiveAppView.TvInteractiveAppCallback();
method public void onBiInteractiveAppCreated(@NonNull String, @NonNull android.net.Uri, @Nullable String);
method public void onPlaybackCommandRequest(@NonNull String, @NonNull String, @NonNull android.os.Bundle);
method public void onRequestAvailableSpeeds(@NonNull String);
method public void onRequestCurrentChannelLcn(@NonNull String);
method public void onRequestCurrentChannelUri(@NonNull String);
method public void onRequestCurrentTvInputId(@NonNull String);
@@ -27692,6 +27730,7 @@ package android.media.tv.interactive {
method public void onRequestStartRecording(@NonNull String, @Nullable android.net.Uri);
method public void onRequestStopRecording(@NonNull String, @NonNull String);
method public void onRequestStreamVolume(@NonNull String);
method public void onRequestTimeShiftMode(@NonNull String);
method public void onRequestTrackInfoList(@NonNull String);
method public void onRequestTvRecordingInfo(@NonNull String, @NonNull String);
method public void onRequestTvRecordingInfoList(@NonNull String, @NonNull int);
@@ -27699,6 +27738,7 @@ package android.media.tv.interactive {
method public void onSetVideoBounds(@NonNull String, @NonNull android.graphics.Rect);
method public void onStateChanged(@NonNull String, int, int);
method public void onTeletextAppStateChanged(@NonNull String, int);
method public void onTimeShiftCommandRequest(@NonNull String, @NonNull String, @NonNull android.os.Bundle);
}
}

View File

@@ -317,25 +317,21 @@ public final class TvInputManager {
/**
* Time shift mode: off.
* <p>Time shift is disabled.
* @hide
*/
public static final int TIME_SHIFT_MODE_OFF = 1;
/**
* Time shift mode: local.
* <p>Time shift is handle locally, using on-device data. E.g. playing a local file.
* @hide
*/
public static final int TIME_SHIFT_MODE_LOCAL = 2;
/**
* Time shift mode: network.
* <p>Time shift is handle remotely via network. E.g. online streaming.
* @hide
*/
public static final int TIME_SHIFT_MODE_NETWORK = 3;
/**
* Time shift mode: auto.
* <p>Time shift mode is handled automatically.
* @hide
*/
public static final int TIME_SHIFT_MODE_AUTO = 4;
@@ -774,7 +770,11 @@ public final class TvInputManager {
* Informs the app available speeds for time-shifting.
* @param session A {@link TvInputManager.Session} associated with this callback.
* @param speeds An ordered array of playback speeds, expressed as values relative to the
* normal playback speed 1.0.
* normal playback speed (1.0), at which the current content can be played as
* a time-shifted broadcast. This is an empty array if the supported playback
* speeds are unknown or the video/broadcast is not in time shift mode. If
* currently in time shift mode, this array will normally include at least
* the values 1.0 (normal speed) and 0.0 (paused).
* @see PlaybackParams#getSpeed()
*/
public void onAvailableSpeeds(Session session, float[] speeds) {

View File

@@ -1117,7 +1117,6 @@ public abstract class TvInputService extends Service {
* {@link TvInputManager#TIME_SHIFT_MODE_OFF}, {@link TvInputManager#TIME_SHIFT_MODE_LOCAL},
* {@link TvInputManager#TIME_SHIFT_MODE_NETWORK},
* {@link TvInputManager#TIME_SHIFT_MODE_AUTO}.
* @hide
*/
public void notifyTimeShiftMode(@android.media.tv.TvInputManager.TimeShiftMode int mode) {
executeOrPostRunnableOnMainThread(new Runnable() {
@@ -1141,9 +1140,12 @@ public abstract class TvInputService extends Service {
* <p>This should be called when time-shifting is enabled.
*
* @param speeds An ordered array of playback speeds, expressed as values relative to the
* normal playback speed 1.0.
* normal playback speed (1.0), at which the current content can be played as
* a time-shifted broadcast. This is an empty array if the supported playback
* speeds are unknown or the video/broadcast is not in time shift mode. If
* currently in time shift mode, this array will normally include at least
* the values 1.0 (normal speed) and 0.0 (paused).
* @see PlaybackParams#getSpeed()
* @hide
*/
public void notifyAvailableSpeeds(@NonNull float[] speeds) {
executeOrPostRunnableOnMainThread(new Runnable() {
@@ -1191,7 +1193,6 @@ public abstract class TvInputService extends Service {
*
* @param available {@code true} if cueing message is available; {@code false} if it becomes
* unavailable.
* @hide
*/
public void notifyCueingMessageAvailability(boolean available) {
executeOrPostRunnableOnMainThread(new Runnable() {
@@ -1575,7 +1576,6 @@ public abstract class TvInputService extends Service {
* {@link TvInputManager#TIME_SHIFT_MODE_OFF}, {@link TvInputManager#TIME_SHIFT_MODE_LOCAL},
* {@link TvInputManager#TIME_SHIFT_MODE_NETWORK},
* {@link TvInputManager#TIME_SHIFT_MODE_AUTO}.
* @hide
*/
public void onTimeShiftSetMode(@android.media.tv.TvInputManager.TimeShiftMode int mode) {
}

View File

@@ -633,7 +633,6 @@ public class TvView extends ViewGroup {
* {@link TvInputManager#TIME_SHIFT_MODE_OFF}, {@link TvInputManager#TIME_SHIFT_MODE_LOCAL},
* {@link TvInputManager#TIME_SHIFT_MODE_NETWORK},
* {@link TvInputManager#TIME_SHIFT_MODE_AUTO}.
* @hide
*/
public void timeShiftSetMode(@android.media.tv.TvInputManager.TimeShiftMode int mode) {
if (mSession != null) {
@@ -1193,7 +1192,6 @@ public class TvView extends ViewGroup {
* @param inputId The ID of the TV input bound to this view.
* @param available The current availability of cueing message. {@code true} if cueing
* message is available; {@code false} if it becomes unavailable.
* @hide
*/
public void onCueingMessageAvailability(@NonNull String inputId, boolean available) {
}
@@ -1206,7 +1204,6 @@ public class TvView extends ViewGroup {
* {@link TvInputManager#TIME_SHIFT_MODE_OFF}, {@link TvInputManager#TIME_SHIFT_MODE_LOCAL},
* {@link TvInputManager#TIME_SHIFT_MODE_NETWORK},
* {@link TvInputManager#TIME_SHIFT_MODE_AUTO}.
* @hide
*/
public void onTimeShiftMode(
@NonNull String inputId, @TvInputManager.TimeShiftMode int mode) {
@@ -1217,11 +1214,14 @@ public class TvView extends ViewGroup {
*
* @param inputId The ID of the TV input bound to this view.
* @param speeds An ordered array of playback speeds, expressed as values relative to the
* normal playback speed 1.0.
* normal playback speed (1.0), at which the current content can be played as
* a time-shifted broadcast. This is an empty array if the supported playback
* speeds are unknown or the video/broadcast is not in time shift mode. If
* currently in time shift mode, this array will normally include at least
* the values 1.0 (normal speed) and 0.0 (paused).
* @see PlaybackParams#getSpeed()
* @hide
*/
public void onAvailableSpeeds(@NonNull String inputId, float[] speeds) {
public void onAvailableSpeeds(@NonNull String inputId, @NonNull float[] speeds) {
}
/**

View File

@@ -231,41 +231,34 @@ public abstract class TvInteractiveAppService extends Service {
* Time shift command type: play.
*
* @see TvView#timeShiftPlay(String, Uri)
* @hide
*/
public static final String TIME_SHIFT_COMMAND_TYPE_PLAY = "play";
/**
* Time shift command type: pause.
*
* @see TvView#timeShiftPause()
* @hide
*/
public static final String TIME_SHIFT_COMMAND_TYPE_PAUSE = "pause";
/**
* Time shift command type: resume.
*
* @see TvView#timeShiftResume()
* @hide
*/
public static final String TIME_SHIFT_COMMAND_TYPE_RESUME = "resume";
/**
* Time shift command type: seek to.
*
* @see TvView#timeShiftSeekTo(long)
* @hide
*/
public static final String TIME_SHIFT_COMMAND_TYPE_SEEK_TO = "seek_to";
/**
* Time shift command type: set playback params.
*
* @see TvView#timeShiftSetPlaybackParams(PlaybackParams)
* @hide
*/
public static final String TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS = "set_playback_params";
/**
* Time shift command type: set time shift mode.
*
* @hide
*/
public static final String TIME_SHIFT_COMMAND_TYPE_SET_MODE = "set_mode";
@@ -274,7 +267,6 @@ public abstract class TvInteractiveAppService extends Service {
* <p>Type: android.net.Uri
*
* @see #TIME_SHIFT_COMMAND_TYPE_PLAY
* @hide
*/
public static final String COMMAND_PARAMETER_KEY_PROGRAM_URI = "command_program_uri";
/**
@@ -282,7 +274,6 @@ public abstract class TvInteractiveAppService extends Service {
* <p>Type: long
*
* @see #TIME_SHIFT_COMMAND_TYPE_SEEK_TO
* @hide
*/
public static final String COMMAND_PARAMETER_KEY_TIME_POSITION = "command_time_position";
/**
@@ -290,7 +281,6 @@ public abstract class TvInteractiveAppService extends Service {
* <p>Type: android.media.PlaybackParams
*
* @see #TIME_SHIFT_COMMAND_TYPE_SET_PLAYBACK_PARAMS
* @hide
*/
public static final String COMMAND_PARAMETER_KEY_PLAYBACK_PARAMS = "command_playback_params";
/**
@@ -301,7 +291,6 @@ public abstract class TvInteractiveAppService extends Service {
* {@link TvInputManager#TIME_SHIFT_MODE_AUTO}.
*
* @see #TIME_SHIFT_COMMAND_TYPE_SET_MODE
* @hide
*/
public static final String COMMAND_PARAMETER_KEY_TIME_SHIFT_MODE = "command_time_shift_mode";
@@ -589,18 +578,24 @@ public abstract class TvInteractiveAppService extends Service {
/**
* Receives current time shift mode.
*
* @param mode The current time shift mode. The value is one of the following:
* {@link TvInputManager#TIME_SHIFT_MODE_OFF}, {@link TvInputManager#TIME_SHIFT_MODE_LOCAL},
* {@link TvInputManager#TIME_SHIFT_MODE_NETWORK},
* {@link TvInputManager#TIME_SHIFT_MODE_AUTO}.
* @hide
*/
public void onTimeShiftMode(@android.media.tv.TvInputManager.TimeShiftMode int mode) {
}
/**
* Receives available speeds.
* @hide
* Receives available playback speeds.
*
* @param speeds An ordered array of playback speeds, expressed as values relative to the
* normal playback speed (1.0), at which the current content can be played as
* a time-shifted broadcast. This is an empty array if the supported playback
* speeds are unknown or the video/broadcast is not in time shift mode. If
* currently in time shift mode, this array will normally include at least
* the values 1.0 (normal speed) and 0.0 (paused).
*/
public void onAvailableSpeeds(@NonNull float[] speeds) {
}
@@ -742,8 +737,8 @@ public abstract class TvInteractiveAppService extends Service {
/**
* Called when the time shift {@link android.media.PlaybackParams} is set or changed.
*
* @param params The new {@link PlaybackParams} that was set or changed.
* @see TvView#timeShiftSetPlaybackParams(PlaybackParams)
* @hide
*/
public void onTimeShiftPlaybackParams(@NonNull PlaybackParams params) {
}
@@ -753,17 +748,25 @@ public abstract class TvInteractiveAppService extends Service {
*
* @see TvView.TvInputCallback#onTimeShiftStatusChanged(String, int)
* @see android.media.tv.TvInputService.Session#notifyTimeShiftStatusChanged(int)
* @hide
* @param inputId The ID of the input for which the time shift status has changed.
* @param status The status of which the input has changed to. Should be one of the
* following.
* <ul>
* <li>{@link TvInputManager#TIME_SHIFT_STATUS_UNKNOWN}
* <li>{@link TvInputManager#TIME_SHIFT_STATUS_UNSUPPORTED}
* <li>{@link TvInputManager#TIME_SHIFT_STATUS_UNAVAILABLE}
* <li>{@link TvInputManager#TIME_SHIFT_STATUS_AVAILABLE}
* </ul>
*/
public void onTimeShiftStatusChanged(
@NonNull String inputId, @TvInputManager.TimeShiftStatus int status) {
}
@NonNull String inputId, @TvInputManager.TimeShiftStatus int status) {}
/**
* Called when time shift start position is changed.
*
* @see TvView.TimeShiftPositionCallback#onTimeShiftStartPositionChanged(String, long)
* @hide
* @param inputId The ID of the input for which the time shift start position has changed.
* @param timeMs The start position for time shifting, in milliseconds since the epoch.
*/
public void onTimeShiftStartPositionChanged(@NonNull String inputId, long timeMs) {
}
@@ -772,7 +775,8 @@ public abstract class TvInteractiveAppService extends Service {
* Called when time shift current position is changed.
*
* @see TvView.TimeShiftPositionCallback#onTimeShiftCurrentPositionChanged(String, long)
* @hide
* @param inputId The ID of the input for which the time shift current position has changed.
* @param timeMs The current position for time shifting, in milliseconds since the epoch.
*/
public void onTimeShiftCurrentPositionChanged(@NonNull String inputId, long timeMs) {
}
@@ -1086,7 +1090,6 @@ public abstract class TvInteractiveAppService extends Service {
*
* @param cmdType type of the specific command
* @param parameters parameters of the specific command
* @hide
*/
@CallSuper
public void sendTimeShiftCommandRequest(
@@ -1275,7 +1278,6 @@ public abstract class TvInteractiveAppService extends Service {
/**
* Requests time shift mode.
* @hide
*/
@CallSuper
public void requestTimeShiftMode() {
@@ -1299,7 +1301,6 @@ public abstract class TvInteractiveAppService extends Service {
/**
* Requests available speeds for time shift.
* @hide
*/
@CallSuper
public void requestAvailableSpeeds() {

View File

@@ -598,13 +598,12 @@ public class TvInteractiveAppView extends ViewGroup {
}
/**
* Sends current time shift mode to related TV interactive app.
* Sends the current time shift mode to the TV interactive app bound to this view
*
* @param mode The current time shift mode. The value is one of the following:
* {@link TvInputManager#TIME_SHIFT_MODE_OFF}, {@link TvInputManager#TIME_SHIFT_MODE_LOCAL},
* {@link TvInputManager#TIME_SHIFT_MODE_NETWORK},
* {@link TvInputManager#TIME_SHIFT_MODE_AUTO}.
* @hide
*/
public void sendTimeShiftMode(@android.media.tv.TvInputManager.TimeShiftMode int mode) {
if (DEBUG) {
@@ -616,12 +615,15 @@ public class TvInteractiveAppView extends ViewGroup {
}
/**
* Sends available supported speeds to related TV interactive app.
* Sends the available supported playback speeds to the TV interactive app bound to this view.
*
* @param speeds An ordered array of playback speeds, expressed as values relative to the normal
* playback speed 1.0.
* @param speeds An ordered array of playback speeds, expressed as values relative to the
* normal playback speed (1.0), at which the current content can be played as
* a time-shifted broadcast. This is an empty array if the supported playback
* speeds are unknown or the video/broadcast is not in time shift mode. If
* currently in time shift mode, this array will normally include at least
* the values 1.0 (normal speed) and 0.0 (paused).
* @see PlaybackParams#getSpeed()
* @hide
*/
public void sendAvailableSpeeds(@NonNull float[] speeds) {
if (DEBUG) {
@@ -743,7 +745,7 @@ public class TvInteractiveAppView extends ViewGroup {
* {@link android.media.PlaybackParams} is set or changed.
*
* @see TvView#timeShiftSetPlaybackParams(PlaybackParams)
* @hide
* @param params The new {@link PlaybackParams} that was set or changed.
*/
public void notifyTimeShiftPlaybackParams(@NonNull PlaybackParams params) {
if (DEBUG) {
@@ -760,7 +762,15 @@ public class TvInteractiveAppView extends ViewGroup {
*
* @see TvView.TvInputCallback#onTimeShiftStatusChanged(String, int)
* @see android.media.tv.TvInputService.Session#notifyTimeShiftStatusChanged(int)
* @hide
* @param inputId The ID of the input for which the time shift status has changed.
* @param status The status of which the input has changed to. Should be one of the
* following.
* <ul>
* <li>{@link TvInputManager#TIME_SHIFT_STATUS_UNKNOWN}
* <li>{@link TvInputManager#TIME_SHIFT_STATUS_UNSUPPORTED}
* <li>{@link TvInputManager#TIME_SHIFT_STATUS_UNAVAILABLE}
* <li>{@link TvInputManager#TIME_SHIFT_STATUS_AVAILABLE}
* </ul>
*/
public void notifyTimeShiftStatusChanged(
@NonNull String inputId, @TvInputManager.TimeShiftStatus int status) {
@@ -778,7 +788,8 @@ public class TvInteractiveAppView extends ViewGroup {
* start position is changed.
*
* @see TvView.TimeShiftPositionCallback#onTimeShiftStartPositionChanged(String, long)
* @hide
* @param inputId The ID of the input for which the time shift start position has changed.
* @param timeMs The start position for time shifting, in milliseconds since the epoch.
*/
public void notifyTimeShiftStartPositionChanged(@NonNull String inputId, long timeMs) {
if (DEBUG) {
@@ -795,7 +806,8 @@ public class TvInteractiveAppView extends ViewGroup {
* current position is changed.
*
* @see TvView.TimeShiftPositionCallback#onTimeShiftCurrentPositionChanged(String, long)
* @hide
* @param inputId The ID of the input for which the time shift current position has changed.
* @param timeMs The current position for time shifting, in milliseconds since the epoch.
*/
public void notifyTimeShiftCurrentPositionChanged(@NonNull String inputId, long timeMs) {
if (DEBUG) {
@@ -1068,7 +1080,6 @@ public class TvInteractiveAppView extends ViewGroup {
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
* @param cmdType type of the command
* @param parameters parameters of the command
* @hide
*/
public void onTimeShiftCommandRequest(
@NonNull String iAppServiceId,
@@ -1186,7 +1197,6 @@ public class TvInteractiveAppView extends ViewGroup {
* called.
*
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
* @hide
*/
public void onRequestTimeShiftMode(@NonNull String iAppServiceId) {
}
@@ -1196,7 +1206,6 @@ public class TvInteractiveAppView extends ViewGroup {
* called.
*
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
* @hide
*/
public void onRequestAvailableSpeeds(@NonNull String iAppServiceId) {
}