TIAF: unhide playback command and remaining public APIs
Bug: 213836031 Test: atest android.media.tv.interactive.cts.TvInteractiveAppViewTest Test: atest android.media.tv.interactive.cts.TvInteractiveAppManagerTest Test: atest android.media.tv.interactive.cts.TvInteractiveAppServiceTest Change-Id: Iad7130f70d892b0ccb3bab1fbf6e59784d6a5975
This commit is contained in:
@@ -26711,6 +26711,9 @@ package android.media.tv {
|
||||
field public static final int RECORDING_ERROR_INSUFFICIENT_SPACE = 1; // 0x1
|
||||
field public static final int RECORDING_ERROR_RESOURCE_BUSY = 2; // 0x2
|
||||
field public static final int RECORDING_ERROR_UNKNOWN = 0; // 0x0
|
||||
field public static final int SIGNAL_STRENGTH_LOST = 1; // 0x1
|
||||
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_STATUS_AVAILABLE = 3; // 0x3
|
||||
field public static final int TIME_SHIFT_STATUS_UNAVAILABLE = 2; // 0x2
|
||||
@@ -26793,6 +26796,7 @@ package android.media.tv {
|
||||
method public void notifyChannelRetuned(android.net.Uri);
|
||||
method public void notifyContentAllowed();
|
||||
method public void notifyContentBlocked(@NonNull android.media.tv.TvContentRating);
|
||||
method public void notifySignalStrength(int);
|
||||
method public void notifyTimeShiftStatusChanged(int);
|
||||
method public void notifyTrackSelected(int, String);
|
||||
method public void notifyTracksChanged(java.util.List<android.media.tv.TvTrackInfo>);
|
||||
@@ -26946,9 +26950,11 @@ package android.media.tv {
|
||||
method public void onContentAllowed(String);
|
||||
method public void onContentBlocked(String, android.media.tv.TvContentRating);
|
||||
method public void onDisconnected(String);
|
||||
method public void onSignalStrength(@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>);
|
||||
method public void onTuned(@NonNull String, @NonNull android.net.Uri);
|
||||
method public void onVideoAvailable(String);
|
||||
method public void onVideoSizeChanged(String, int, int);
|
||||
method public void onVideoUnavailable(String, int);
|
||||
@@ -26973,9 +26979,11 @@ package android.media.tv.interactive {
|
||||
|
||||
public final class TvInteractiveAppManager {
|
||||
method @NonNull public java.util.List<android.media.tv.interactive.TvInteractiveAppInfo> getTvInteractiveAppServiceList();
|
||||
method public void prepare(@NonNull String, int);
|
||||
method public void registerCallback(@NonNull android.media.tv.interactive.TvInteractiveAppManager.TvInteractiveAppCallback, @NonNull java.util.concurrent.Executor);
|
||||
method public void sendAppLinkCommand(@NonNull String, @NonNull android.os.Bundle);
|
||||
method public void unregisterCallback(@NonNull android.media.tv.interactive.TvInteractiveAppManager.TvInteractiveAppCallback);
|
||||
field public static final String ACTION_APP_LINK_COMMAND = "android.media.tv.interactive.action.APP_LINK_COMMAND";
|
||||
field public static final int ERROR_BLOCKED = 5; // 0x5
|
||||
field public static final int ERROR_ENCRYPTED = 6; // 0x6
|
||||
field public static final int ERROR_NONE = 0; // 0x0
|
||||
@@ -26984,6 +26992,11 @@ package android.media.tv.interactive {
|
||||
field public static final int ERROR_UNKNOWN = 1; // 0x1
|
||||
field public static final int ERROR_UNKNOWN_CHANNEL = 7; // 0x7
|
||||
field public static final int ERROR_WEAK_SIGNAL = 3; // 0x3
|
||||
field public static final String INTENT_KEY_BI_INTERACTIVE_APP_TYPE = "bi_interactive_app_type";
|
||||
field public static final String INTENT_KEY_BI_INTERACTIVE_APP_URI = "bi_interactive_app_uri";
|
||||
field public static final String INTENT_KEY_CHANNEL_URI = "channel_uri";
|
||||
field public static final String INTENT_KEY_INTERACTIVE_APP_SERVICE_ID = "interactive_app_id";
|
||||
field public static final String INTENT_KEY_TV_INPUT_ID = "tv_input_id";
|
||||
field public static final int INTERACTIVE_APP_STATE_ERROR = 3; // 0x3
|
||||
field public static final int INTERACTIVE_APP_STATE_RUNNING = 2; // 0x2
|
||||
field public static final int INTERACTIVE_APP_STATE_STOPPED = 1; // 0x1
|
||||
@@ -26996,10 +27009,16 @@ package android.media.tv.interactive {
|
||||
field public static final int SERVICE_STATE_PREPARING = 2; // 0x2
|
||||
field public static final int SERVICE_STATE_READY = 3; // 0x3
|
||||
field public static final int SERVICE_STATE_UNREALIZED = 1; // 0x1
|
||||
field public static final int TELETEXT_APP_STATE_ERROR = 3; // 0x3
|
||||
field public static final int TELETEXT_APP_STATE_HIDE = 2; // 0x2
|
||||
field public static final int TELETEXT_APP_STATE_SHOW = 1; // 0x1
|
||||
}
|
||||
|
||||
public abstract static class TvInteractiveAppManager.TvInteractiveAppCallback {
|
||||
ctor public TvInteractiveAppManager.TvInteractiveAppCallback();
|
||||
method public void onInteractiveAppServiceAdded(@NonNull String);
|
||||
method public void onInteractiveAppServiceRemoved(@NonNull String);
|
||||
method public void onInteractiveAppServiceUpdated(@NonNull String);
|
||||
method public void onTvInteractiveAppServiceStateChanged(@NonNull String, int, int, int);
|
||||
}
|
||||
|
||||
@@ -27007,9 +27026,21 @@ package android.media.tv.interactive {
|
||||
ctor public TvInteractiveAppService();
|
||||
method public final void notifyStateChanged(int, int, int);
|
||||
method public void onAppLinkCommand(@NonNull android.os.Bundle);
|
||||
method public final android.os.IBinder onBind(android.content.Intent);
|
||||
method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent);
|
||||
method @Nullable public abstract android.media.tv.interactive.TvInteractiveAppService.Session onCreateSession(@NonNull String, int);
|
||||
method public abstract void onPrepare(int);
|
||||
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_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";
|
||||
field public static final String PLAYBACK_COMMAND_TYPE_SELECT_TRACK = "select_track";
|
||||
field public static final String PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME = "set_stream_volume";
|
||||
field public static final String PLAYBACK_COMMAND_TYPE_STOP = "stop";
|
||||
field public static final String PLAYBACK_COMMAND_TYPE_TUNE = "tune";
|
||||
field public static final String PLAYBACK_COMMAND_TYPE_TUNE_NEXT = "tune_next";
|
||||
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";
|
||||
}
|
||||
@@ -27019,19 +27050,48 @@ package android.media.tv.interactive {
|
||||
method public void layoutSurface(int, int, int, int);
|
||||
method public final void notifyBiInteractiveAppCreated(@NonNull android.net.Uri, @Nullable String);
|
||||
method public void notifySessionStateChanged(int, int);
|
||||
method public final void notifyTeletextAppStateChanged(int);
|
||||
method public void onAdResponse(@NonNull android.media.tv.AdResponse);
|
||||
method public void onContentAllowed();
|
||||
method public void onContentBlocked(@NonNull android.media.tv.TvContentRating);
|
||||
method public void onCreateBiInteractiveApp(@NonNull android.net.Uri, @Nullable android.os.Bundle);
|
||||
method @Nullable public android.view.View onCreateMediaView();
|
||||
method public void onCurrentChannelLcn(int);
|
||||
method public void onCurrentChannelUri(@Nullable android.net.Uri);
|
||||
method public void onCurrentTvInputId(@Nullable String);
|
||||
method public void onDestroyBiInteractiveApp(@NonNull String);
|
||||
method public boolean onGenericMotionEvent(@NonNull android.view.MotionEvent);
|
||||
method public boolean onKeyDown(int, @NonNull android.view.KeyEvent);
|
||||
method public boolean onKeyLongPress(int, @NonNull android.view.KeyEvent);
|
||||
method public boolean onKeyMultiple(int, int, @NonNull android.view.KeyEvent);
|
||||
method public boolean onKeyUp(int, @NonNull android.view.KeyEvent);
|
||||
method public void onMediaViewSizeChanged(int, int);
|
||||
method public abstract void onRelease();
|
||||
method public void onResetInteractiveApp();
|
||||
method public abstract boolean onSetSurface(@Nullable android.view.Surface);
|
||||
method public void onSetTeletextAppEnabled(boolean);
|
||||
method public void onSignalStrength(int);
|
||||
method public void onStartInteractiveApp();
|
||||
method public void onStopInteractiveApp();
|
||||
method public void onStreamVolume(float);
|
||||
method public void onSurfaceChanged(int, int, 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);
|
||||
method public boolean onTrackballEvent(@NonNull android.view.MotionEvent);
|
||||
method public void onTracksChanged(@NonNull java.util.List<android.media.tv.TvTrackInfo>);
|
||||
method public void onTuned(@NonNull android.net.Uri);
|
||||
method public void onVideoAvailable();
|
||||
method public void onVideoUnavailable(int);
|
||||
method public void requestAd(@NonNull android.media.tv.AdRequest);
|
||||
method public void requestCurrentChannelLcn();
|
||||
method public void requestCurrentChannelUri();
|
||||
method public void requestCurrentTvInputId();
|
||||
method public void requestStreamVolume();
|
||||
method public void requestTrackInfoList();
|
||||
method public void sendPlaybackCommandRequest(@NonNull String, @Nullable android.os.Bundle);
|
||||
method public void setMediaViewEnabled(boolean);
|
||||
method public void setVideoBounds(@NonNull android.graphics.Rect);
|
||||
}
|
||||
|
||||
public class TvInteractiveAppView extends android.view.ViewGroup {
|
||||
@@ -27039,19 +27099,48 @@ package android.media.tv.interactive {
|
||||
ctor public TvInteractiveAppView(@NonNull android.content.Context, @Nullable android.util.AttributeSet);
|
||||
ctor public TvInteractiveAppView(@NonNull android.content.Context, @Nullable android.util.AttributeSet, int);
|
||||
method public void clearCallback();
|
||||
method public void clearOnUnhandledInputEventListener();
|
||||
method public void createBiInteractiveApp(@NonNull android.net.Uri, @Nullable android.os.Bundle);
|
||||
method public void destroyBiInteractiveApp(@NonNull String);
|
||||
method public boolean dispatchUnhandledInputEvent(@NonNull android.view.InputEvent);
|
||||
method public void onAttachedToWindow();
|
||||
method public void onDetachedFromWindow();
|
||||
method public void onLayout(boolean, int, int, int, int);
|
||||
method public void onMeasure(int, int);
|
||||
method public boolean onUnhandledInputEvent(@NonNull android.view.InputEvent);
|
||||
method public void onVisibilityChanged(@NonNull android.view.View, int);
|
||||
method public void prepareInteractiveApp(@NonNull String, int);
|
||||
method public void reset();
|
||||
method public void resetInteractiveApp();
|
||||
method public void sendCurrentChannelLcn(int);
|
||||
method public void sendCurrentChannelUri(@Nullable android.net.Uri);
|
||||
method public void sendCurrentTvInputId(@Nullable String);
|
||||
method public void sendStreamVolume(float);
|
||||
method public void sendTrackInfoList(@Nullable java.util.List<android.media.tv.TvTrackInfo>);
|
||||
method public void setCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.interactive.TvInteractiveAppView.TvInteractiveAppCallback);
|
||||
method public void setOnUnhandledInputEventListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.interactive.TvInteractiveAppView.OnUnhandledInputEventListener);
|
||||
method public void setTeletextAppEnabled(boolean);
|
||||
method public int setTvView(@Nullable android.media.tv.TvView);
|
||||
method public void startInteractiveApp();
|
||||
method public void stopInteractiveApp();
|
||||
}
|
||||
|
||||
public static interface TvInteractiveAppView.OnUnhandledInputEventListener {
|
||||
method public boolean onUnhandledInputEvent(@NonNull android.view.InputEvent);
|
||||
}
|
||||
|
||||
public abstract static class TvInteractiveAppView.TvInteractiveAppCallback {
|
||||
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 onRequestCurrentChannelLcn(@NonNull String);
|
||||
method public void onRequestCurrentChannelUri(@NonNull String);
|
||||
method public void onRequestCurrentTvInputId(@NonNull String);
|
||||
method public void onRequestStreamVolume(@NonNull String);
|
||||
method public void onRequestTrackInfoList(@NonNull String);
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -394,17 +394,14 @@ public final class TvInputManager {
|
||||
|
||||
/**
|
||||
* Signal lost.
|
||||
* @hide
|
||||
*/
|
||||
public static final int SIGNAL_STRENGTH_LOST = 1;
|
||||
/**
|
||||
* Weak signal.
|
||||
* @hide
|
||||
*/
|
||||
public static final int SIGNAL_STRENGTH_WEAK = 2;
|
||||
/**
|
||||
* Strong signal.
|
||||
* @hide
|
||||
*/
|
||||
public static final int SIGNAL_STRENGTH_STRONG = 3;
|
||||
|
||||
|
||||
@@ -976,7 +976,6 @@ public abstract class TvInputService extends Service {
|
||||
|
||||
/**
|
||||
* Notifies signal strength.
|
||||
* @hide
|
||||
*/
|
||||
public void notifySignalStrength(@TvInputManager.SignalStrength final int strength) {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
|
||||
@@ -1082,7 +1082,6 @@ public class TvView extends ViewGroup {
|
||||
*
|
||||
* @param inputId The ID of the TV input bound to this view.
|
||||
* @param strength The current signal strength.
|
||||
* @hide
|
||||
*/
|
||||
public void onSignalStrength(
|
||||
@NonNull String inputId, @TvInputManager.SignalStrength int strength) {
|
||||
@@ -1092,7 +1091,6 @@ public class TvView extends ViewGroup {
|
||||
* This is called when the session has been tuned to the given channel.
|
||||
*
|
||||
* @param channelUri The URI of a channel.
|
||||
* @hide
|
||||
*/
|
||||
public void onTuned(@NonNull String inputId, @NonNull Uri channelUri) {
|
||||
}
|
||||
|
||||
@@ -175,17 +175,14 @@ public final class TvInteractiveAppManager {
|
||||
|
||||
/**
|
||||
* State of Teletext app: show
|
||||
* @hide
|
||||
*/
|
||||
public static final int TELETEXT_APP_STATE_SHOW = 1;
|
||||
/**
|
||||
* State of Teletext app: hide
|
||||
* @hide
|
||||
*/
|
||||
public static final int TELETEXT_APP_STATE_HIDE = 2;
|
||||
/**
|
||||
* State of Teletext app: error
|
||||
* @hide
|
||||
*/
|
||||
public static final int TELETEXT_APP_STATE_ERROR = 3;
|
||||
|
||||
@@ -233,7 +230,6 @@ public final class TvInteractiveAppManager {
|
||||
* Broadcast intent action to send app command to TV app.
|
||||
*
|
||||
* @see #sendAppLinkCommand(String, Bundle)
|
||||
* @hide
|
||||
*/
|
||||
public static final String ACTION_APP_LINK_COMMAND =
|
||||
"android.media.tv.interactive.action.APP_LINK_COMMAND";
|
||||
@@ -244,7 +240,6 @@ public final class TvInteractiveAppManager {
|
||||
*
|
||||
* @see #sendAppLinkCommand(String, Bundle)
|
||||
* @see #ACTION_APP_LINK_COMMAND
|
||||
* @hide
|
||||
*/
|
||||
public static final String INTENT_KEY_TV_INPUT_ID = "tv_input_id";
|
||||
|
||||
@@ -255,7 +250,6 @@ public final class TvInteractiveAppManager {
|
||||
* @see #sendAppLinkCommand(String, Bundle)
|
||||
* @see #ACTION_APP_LINK_COMMAND
|
||||
* @see android.media.tv.interactive.TvInteractiveAppInfo#getId()
|
||||
* @hide
|
||||
*/
|
||||
public static final String INTENT_KEY_INTERACTIVE_APP_SERVICE_ID = "interactive_app_id";
|
||||
|
||||
@@ -265,7 +259,6 @@ public final class TvInteractiveAppManager {
|
||||
*
|
||||
* @see #sendAppLinkCommand(String, Bundle)
|
||||
* @see #ACTION_APP_LINK_COMMAND
|
||||
* @hide
|
||||
*/
|
||||
public static final String INTENT_KEY_CHANNEL_URI = "channel_uri";
|
||||
|
||||
@@ -277,8 +270,7 @@ public final class TvInteractiveAppManager {
|
||||
* @see #sendAppLinkCommand(String, Bundle)
|
||||
* @see #ACTION_APP_LINK_COMMAND
|
||||
* @see android.media.tv.interactive.TvInteractiveAppInfo#getSupportedTypes()
|
||||
* @see Session#createBiInteractiveApp(Uri, Bundle)
|
||||
* @hide
|
||||
* @see android.media.tv.interactive.TvInteractiveAppView#createBiInteractiveApp(Uri, Bundle)
|
||||
*/
|
||||
public static final String INTENT_KEY_BI_INTERACTIVE_APP_TYPE = "bi_interactive_app_type";
|
||||
|
||||
@@ -289,8 +281,7 @@ public final class TvInteractiveAppManager {
|
||||
*
|
||||
* @see #sendAppLinkCommand(String, Bundle)
|
||||
* @see #ACTION_APP_LINK_COMMAND
|
||||
* @see Session#createBiInteractiveApp(Uri, Bundle)
|
||||
* @hide
|
||||
* @see android.media.tv.interactive.TvInteractiveAppView#createBiInteractiveApp(Uri, Bundle)
|
||||
*/
|
||||
public static final String INTENT_KEY_BI_INTERACTIVE_APP_URI = "bi_interactive_app_uri";
|
||||
|
||||
@@ -590,7 +581,6 @@ public final class TvInteractiveAppManager {
|
||||
* that implements {@link TvInteractiveAppService} interface.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV Interactive App service.
|
||||
* @hide
|
||||
*/
|
||||
public void onInteractiveAppServiceAdded(@NonNull String iAppServiceId) {
|
||||
}
|
||||
@@ -602,7 +592,6 @@ public final class TvInteractiveAppManager {
|
||||
* App service package.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV Interactive App service.
|
||||
* @hide
|
||||
*/
|
||||
public void onInteractiveAppServiceRemoved(@NonNull String iAppServiceId) {
|
||||
}
|
||||
@@ -614,7 +603,6 @@ public final class TvInteractiveAppManager {
|
||||
* re-installed or a newer version of the package exists becomes available/unavailable.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV Interactive App service.
|
||||
* @hide
|
||||
*/
|
||||
public void onInteractiveAppServiceUpdated(@NonNull String iAppServiceId) {
|
||||
}
|
||||
@@ -762,7 +750,6 @@ public final class TvInteractiveAppManager {
|
||||
|
||||
/**
|
||||
* Prepares TV Interactive App service environment for the given type.
|
||||
* @hide
|
||||
*/
|
||||
public void prepare(@NonNull String tvIAppServiceId, int type) {
|
||||
try {
|
||||
|
||||
@@ -111,33 +111,27 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
/**
|
||||
* Playback command type: tune to the given channel.
|
||||
* @see #COMMAND_PARAMETER_KEY_CHANNEL_URI
|
||||
* @hide
|
||||
*/
|
||||
public static final String PLAYBACK_COMMAND_TYPE_TUNE = "tune";
|
||||
/**
|
||||
* Playback command type: tune to the next channel.
|
||||
* @hide
|
||||
*/
|
||||
public static final String PLAYBACK_COMMAND_TYPE_TUNE_NEXT = "tune_next";
|
||||
/**
|
||||
* Playback command type: tune to the previous channel.
|
||||
* @hide
|
||||
*/
|
||||
public static final String PLAYBACK_COMMAND_TYPE_TUNE_PREV = "tune_previous";
|
||||
/**
|
||||
* Playback command type: stop the playback.
|
||||
* @hide
|
||||
*/
|
||||
public static final String PLAYBACK_COMMAND_TYPE_STOP = "stop";
|
||||
/**
|
||||
* Playback command type: set the volume.
|
||||
* @hide
|
||||
*/
|
||||
public static final String PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME =
|
||||
"set_stream_volume";
|
||||
/**
|
||||
* Playback command type: select the given track.
|
||||
* @hide
|
||||
*/
|
||||
public static final String PLAYBACK_COMMAND_TYPE_SELECT_TRACK = "select_track";
|
||||
/**
|
||||
@@ -145,7 +139,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
* <p>Type: android.net.Uri
|
||||
*
|
||||
* @see #PLAYBACK_COMMAND_TYPE_TUNE
|
||||
* @hide
|
||||
*/
|
||||
public static final String COMMAND_PARAMETER_KEY_CHANNEL_URI = "command_channel_uri";
|
||||
/**
|
||||
@@ -153,7 +146,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
* <p>Type: String
|
||||
*
|
||||
* @see TvInputInfo#getId()
|
||||
* @hide
|
||||
*/
|
||||
public static final String COMMAND_PARAMETER_KEY_INPUT_ID = "command_input_id";
|
||||
/**
|
||||
@@ -161,7 +153,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
* <p>Type: float
|
||||
*
|
||||
* @see #PLAYBACK_COMMAND_TYPE_SET_STREAM_VOLUME
|
||||
* @hide
|
||||
*/
|
||||
public static final String COMMAND_PARAMETER_KEY_VOLUME = "command_volume";
|
||||
/**
|
||||
@@ -170,7 +161,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
*
|
||||
* @see #PLAYBACK_COMMAND_TYPE_SELECT_TRACK
|
||||
* @see TvTrackInfo#getType()
|
||||
* @hide
|
||||
*/
|
||||
public static final String COMMAND_PARAMETER_KEY_TRACK_TYPE = "command_track_type";
|
||||
/**
|
||||
@@ -179,13 +169,11 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
*
|
||||
* @see #PLAYBACK_COMMAND_TYPE_SELECT_TRACK
|
||||
* @see TvTrackInfo#getId()
|
||||
* @hide
|
||||
*/
|
||||
public static final String COMMAND_PARAMETER_KEY_TRACK_ID = "command_track_id";
|
||||
/**
|
||||
* Command to quiet channel change. No channel banner or channel info is shown.
|
||||
* <p>Refer to HbbTV Spec 2.0.4 chapter A.2.4.3.
|
||||
* @hide
|
||||
*/
|
||||
public static final String COMMAND_PARAMETER_KEY_CHANGE_CHANNEL_QUIETLY =
|
||||
"command_change_channel_quietly";
|
||||
@@ -194,9 +182,9 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
private final RemoteCallbackList<ITvInteractiveAppServiceCallback> mCallbacks =
|
||||
new RemoteCallbackList<>();
|
||||
|
||||
/** @hide */
|
||||
@Override
|
||||
public final IBinder onBind(Intent intent) {
|
||||
@Nullable
|
||||
public final IBinder onBind(@NonNull Intent intent) {
|
||||
ITvInteractiveAppService.Stub tvIAppServiceBinder = new ITvInteractiveAppService.Stub() {
|
||||
@Override
|
||||
public void registerCallback(ITvInteractiveAppServiceCallback cb) {
|
||||
@@ -364,7 +352,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
*
|
||||
* @param enable {@code true} if you want to enable the media view. {@code false}
|
||||
* otherwise.
|
||||
* @hide
|
||||
*/
|
||||
public void setMediaViewEnabled(final boolean enable) {
|
||||
mHandler.post(new Runnable() {
|
||||
@@ -399,7 +386,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Resets TvIAppService session.
|
||||
* @hide
|
||||
*/
|
||||
public void onResetInteractiveApp() {
|
||||
}
|
||||
@@ -431,42 +417,36 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
/**
|
||||
* To toggle Digital Teletext Application if there is one in AIT app list.
|
||||
* @param enable {@code true} to enable teletext app; {@code false} otherwise.
|
||||
* @hide
|
||||
*/
|
||||
public void onSetTeletextAppEnabled(boolean enable) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives current channel URI.
|
||||
* @hide
|
||||
*/
|
||||
public void onCurrentChannelUri(@Nullable Uri channelUri) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives logical channel number (LCN) of current channel.
|
||||
* @hide
|
||||
*/
|
||||
public void onCurrentChannelLcn(int lcn) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives current stream volume.
|
||||
* @hide
|
||||
*/
|
||||
public void onStreamVolume(float volume) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives track list.
|
||||
* @hide
|
||||
*/
|
||||
public void onTrackInfoList(@NonNull List<TvTrackInfo> tracks) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives current TV input ID.
|
||||
* @hide
|
||||
*/
|
||||
public void onCurrentTvInputId(@Nullable String inputId) {
|
||||
}
|
||||
@@ -506,7 +486,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
*
|
||||
* @param width The width of the media view.
|
||||
* @param height The height of the media view.
|
||||
* @hide
|
||||
*/
|
||||
public void onMediaViewSizeChanged(int width, int height) {
|
||||
}
|
||||
@@ -516,7 +495,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
* implementation can override this method and return its own view.
|
||||
*
|
||||
* @return a view attached to the media window
|
||||
* @hide
|
||||
*/
|
||||
@Nullable
|
||||
public View onCreateMediaView() {
|
||||
@@ -525,10 +503,8 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Releases TvInteractiveAppService session.
|
||||
* @hide
|
||||
*/
|
||||
public void onRelease() {
|
||||
}
|
||||
public abstract void onRelease();
|
||||
|
||||
/**
|
||||
* Called when the corresponding TV input tuned to a channel.
|
||||
@@ -540,49 +516,42 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Called when the corresponding TV input selected to a track.
|
||||
* @hide
|
||||
*/
|
||||
public void onTrackSelected(@TvTrackInfo.Type int type, @NonNull String trackId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the tracks are changed.
|
||||
* @hide
|
||||
*/
|
||||
public void onTracksChanged(@NonNull List<TvTrackInfo> tracks) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when video is available.
|
||||
* @hide
|
||||
*/
|
||||
public void onVideoAvailable() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when video is unavailable.
|
||||
* @hide
|
||||
*/
|
||||
public void onVideoUnavailable(@TvInputManager.VideoUnavailableReason int reason) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when content is allowed.
|
||||
* @hide
|
||||
*/
|
||||
public void onContentAllowed() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when content is blocked.
|
||||
* @hide
|
||||
*/
|
||||
public void onContentBlocked(@NonNull TvContentRating rating) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when signal strength is changed.
|
||||
* @hide
|
||||
*/
|
||||
public void onSignalStrength(@TvInputManager.SignalStrength int strength) {
|
||||
}
|
||||
@@ -627,7 +596,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
* @return If you handled the event, return {@code true}. If you want to allow the event to
|
||||
* be handled by the next receiver, return {@code false}.
|
||||
* @see View#onTouchEvent
|
||||
* @hide
|
||||
*/
|
||||
public boolean onTouchEvent(@NonNull MotionEvent event) {
|
||||
return false;
|
||||
@@ -640,7 +608,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
* @return If you handled the event, return {@code true}. If you want to allow the event to
|
||||
* be handled by the next receiver, return {@code false}.
|
||||
* @see View#onTrackballEvent
|
||||
* @hide
|
||||
*/
|
||||
public boolean onTrackballEvent(@NonNull MotionEvent event) {
|
||||
return false;
|
||||
@@ -653,7 +620,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
* @return If you handled the event, return {@code true}. If you want to allow the event to
|
||||
* be handled by the next receiver, return {@code false}.
|
||||
* @see View#onGenericMotionEvent
|
||||
* @hide
|
||||
*/
|
||||
public boolean onGenericMotionEvent(@NonNull MotionEvent event) {
|
||||
return false;
|
||||
@@ -747,7 +713,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
*
|
||||
* @param cmdType type of the specific command
|
||||
* @param parameters parameters of the specific command
|
||||
* @hide
|
||||
*/
|
||||
public void sendPlaybackCommandRequest(
|
||||
@PlaybackCommandType @NonNull String cmdType, @Nullable Bundle parameters) {
|
||||
@@ -772,7 +737,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Sets broadcast video bounds.
|
||||
* @hide
|
||||
*/
|
||||
public void setVideoBounds(@NonNull Rect rect) {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
@@ -795,7 +759,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Requests the URI of the current channel.
|
||||
* @hide
|
||||
*/
|
||||
public void requestCurrentChannelUri() {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
@@ -818,7 +781,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Requests the logic channel number (LCN) of the current channel.
|
||||
* @hide
|
||||
*/
|
||||
public void requestCurrentChannelLcn() {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
@@ -841,7 +803,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Requests stream volume.
|
||||
* @hide
|
||||
*/
|
||||
public void requestStreamVolume() {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
@@ -864,7 +825,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Requests the list of {@link TvTrackInfo}.
|
||||
* @hide
|
||||
*/
|
||||
public void requestTrackInfoList() {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
@@ -889,7 +849,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
* Requests current TV input ID.
|
||||
*
|
||||
* @see android.media.tv.TvInputInfo
|
||||
* @hide
|
||||
*/
|
||||
public void requestCurrentTvInputId() {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
@@ -1132,7 +1091,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
/**
|
||||
* Notifies when the digital teletext app state is changed.
|
||||
* @param state the current state.
|
||||
* @hide
|
||||
*/
|
||||
public final void notifyTeletextAppStateChanged(
|
||||
@TvInteractiveAppManager.TeletextAppState int state) {
|
||||
|
||||
@@ -170,23 +170,20 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
}
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
createSessionMediaView();
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
public void onDetachedFromWindow() {
|
||||
removeSessionMediaView();
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
public void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "onLayout (left=" + left + ", top=" + top + ", right=" + right
|
||||
+ ", bottom=" + bottom + ",)");
|
||||
@@ -199,9 +196,8 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
}
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
mSurfaceView.measure(widthMeasureSpec, heightMeasureSpec);
|
||||
int width = mSurfaceView.getMeasuredWidth();
|
||||
int height = mSurfaceView.getMeasuredHeight();
|
||||
@@ -211,9 +207,8 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
childState << MEASURED_HEIGHT_STATE_SHIFT));
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@Override
|
||||
protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
|
||||
public void onVisibilityChanged(@NonNull View changedView, int visibility) {
|
||||
super.onVisibilityChanged(changedView, visibility);
|
||||
mSurfaceView.setVisibility(visibility);
|
||||
if (visibility == View.VISIBLE) {
|
||||
@@ -244,7 +239,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
|
||||
/**
|
||||
* Resets this TvInteractiveAppView.
|
||||
* @hide
|
||||
*/
|
||||
public void reset() {
|
||||
if (DEBUG) Log.d(TAG, "reset()");
|
||||
@@ -335,7 +329,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
*
|
||||
* @param event The input event.
|
||||
* @return {@code true} if the event was handled by the view, {@code false} otherwise.
|
||||
* @hide
|
||||
*/
|
||||
public boolean dispatchUnhandledInputEvent(@NonNull InputEvent event) {
|
||||
if (mOnUnhandledInputEventListener != null) {
|
||||
@@ -354,7 +347,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
* @param event The input event.
|
||||
* @return If you handled the event, return {@code true}. If you want to allow the event to be
|
||||
* handled by the next receiver, return {@code false}.
|
||||
* @hide
|
||||
*/
|
||||
public boolean onUnhandledInputEvent(@NonNull InputEvent event) {
|
||||
return false;
|
||||
@@ -365,7 +357,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
* by the TV Interactive App.
|
||||
*
|
||||
* @param listener The callback to be invoked when the unhandled input event is received.
|
||||
* @hide
|
||||
*/
|
||||
public void setOnUnhandledInputEventListener(
|
||||
@NonNull @CallbackExecutor Executor executor,
|
||||
@@ -374,8 +365,7 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
// TODO: handle CallbackExecutor
|
||||
}
|
||||
/**
|
||||
* Clears the {@link OnUnhandledInputEventListener}
|
||||
* @hide
|
||||
* Clears the {@link OnUnhandledInputEventListener}.
|
||||
*/
|
||||
public void clearOnUnhandledInputEventListener() {
|
||||
mOnUnhandledInputEventListener = null;
|
||||
@@ -442,7 +432,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
|
||||
/**
|
||||
* Resets the interactive application.
|
||||
* @hide
|
||||
*/
|
||||
public void resetInteractiveApp() {
|
||||
if (DEBUG) {
|
||||
@@ -458,7 +447,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
*
|
||||
* @param channelUri The current channel URI; {@code null} if there is no currently tuned
|
||||
* channel.
|
||||
* @hide
|
||||
*/
|
||||
public void sendCurrentChannelUri(@Nullable Uri channelUri) {
|
||||
if (DEBUG) {
|
||||
@@ -471,7 +459,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
|
||||
/**
|
||||
* Sends current channel logical channel number (LCN) to related TV interactive app.
|
||||
* @hide
|
||||
*/
|
||||
public void sendCurrentChannelLcn(int lcn) {
|
||||
if (DEBUG) {
|
||||
@@ -484,7 +471,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
|
||||
/**
|
||||
* Sends stream volume to related TV interactive app.
|
||||
* @hide
|
||||
*/
|
||||
public void sendStreamVolume(float volume) {
|
||||
if (DEBUG) {
|
||||
@@ -497,7 +483,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
|
||||
/**
|
||||
* Sends track info list to related TV interactive app.
|
||||
* @hide
|
||||
*/
|
||||
public void sendTrackInfoList(@Nullable List<TvTrackInfo> tracks) {
|
||||
if (DEBUG) {
|
||||
@@ -514,7 +499,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
* @param inputId The current TV input ID whose channel is tuned. {@code null} if no channel is
|
||||
* tuned.
|
||||
* @see android.media.tv.TvInputInfo
|
||||
* @hide
|
||||
*/
|
||||
public void sendCurrentTvInputId(@Nullable String inputId) {
|
||||
if (DEBUG) {
|
||||
@@ -611,7 +595,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
* graphics.
|
||||
*
|
||||
* @param enable {@code true} to enable Teletext app; {@code false} to disable it.
|
||||
* @hide
|
||||
*/
|
||||
public void setTeletextAppEnabled(boolean enable) {
|
||||
if (DEBUG) {
|
||||
@@ -635,7 +618,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 onPlaybackCommandRequest(
|
||||
@NonNull String iAppServiceId,
|
||||
@@ -679,7 +661,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
|
||||
* @param state digital teletext app current state.
|
||||
* @hide
|
||||
*/
|
||||
public void onTeletextAppStateChanged(
|
||||
@NonNull String iAppServiceId,
|
||||
@@ -687,59 +668,55 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when {@link TvInteractiveAppService.Session#SetVideoBounds} is called.
|
||||
* This is called when {@link TvInteractiveAppService.Session#setVideoBounds(Rect)} is
|
||||
* called.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
|
||||
* @hide
|
||||
*/
|
||||
public void onSetVideoBounds(@NonNull String iAppServiceId, @NonNull Rect rect) {
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when {@link TvInteractiveAppService.Session#RequestCurrentChannelUri} is
|
||||
* This is called when {@link TvInteractiveAppService.Session#requestCurrentChannelUri()} is
|
||||
* called.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
|
||||
* @hide
|
||||
*/
|
||||
public void onRequestCurrentChannelUri(@NonNull String iAppServiceId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when {@link TvInteractiveAppService.Session#RequestCurrentChannelLcn} is
|
||||
* This is called when {@link TvInteractiveAppService.Session#requestCurrentChannelLcn()} is
|
||||
* called.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
|
||||
* @hide
|
||||
*/
|
||||
public void onRequestCurrentChannelLcn(@NonNull String iAppServiceId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when {@link TvInteractiveAppService.Session#RequestStreamVolume} is
|
||||
* This is called when {@link TvInteractiveAppService.Session#requestStreamVolume()} is
|
||||
* called.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
|
||||
* @hide
|
||||
*/
|
||||
public void onRequestStreamVolume(@NonNull String iAppServiceId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when {@link TvInteractiveAppService.Session#RequestTrackInfoList} is
|
||||
* This is called when {@link TvInteractiveAppService.Session#requestTrackInfoList()} is
|
||||
* called.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
|
||||
* @hide
|
||||
*/
|
||||
public void onRequestTrackInfoList(@NonNull String iAppServiceId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when {@link TvIAppService.Session#RequestCurrentTvInputId} is called.
|
||||
* This is called when {@link TvInteractiveAppService.Session#requestCurrentTvInputId()} is
|
||||
* called.
|
||||
*
|
||||
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
|
||||
* @hide
|
||||
*/
|
||||
public void onRequestCurrentTvInputId(@NonNull String iAppServiceId) {
|
||||
}
|
||||
@@ -748,7 +725,6 @@ public class TvInteractiveAppView extends ViewGroup {
|
||||
|
||||
/**
|
||||
* Interface definition for a callback to be invoked when the unhandled input event is received.
|
||||
* @hide
|
||||
*/
|
||||
public interface OnUnhandledInputEventListener {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user