Loading core/api/current.txt +50 −0 Original line number Diff line number Diff line Loading @@ -24933,6 +24933,42 @@ package android.media.tv { field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.AitInfo> CREATOR; } public abstract class BroadcastInfoRequest implements android.os.Parcelable { method public int describeContents(); method public int getOption(); method public int getRequestId(); method public int getType(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.BroadcastInfoRequest> CREATOR; field public static final int REQUEST_OPTION_AUTO_UPDATE = 1; // 0x1 field public static final int REQUEST_OPTION_REPEAT = 0; // 0x0 } public abstract class BroadcastInfoResponse implements android.os.Parcelable { method public int describeContents(); method public int getRequestId(); method public int getResponseResult(); method public int getSequence(); method public int getType(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.BroadcastInfoResponse> CREATOR; field public static final int RESPONSE_RESULT_CANCEL = 3; // 0x3 field public static final int RESPONSE_RESULT_ERROR = 1; // 0x1 field public static final int RESPONSE_RESULT_OK = 2; // 0x2 } public final class TsRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable { ctor public TsRequest(int, int, int); method public int getTsPid(); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TsRequest> CREATOR; } public final class TsResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable { ctor public TsResponse(int, int, int, @NonNull String); method @Nullable public String getSharedFilterToken(); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TsResponse> CREATOR; } public final class TvContentRating { method public boolean contains(@NonNull android.media.tv.TvContentRating); method public static android.media.tv.TvContentRating createRating(String, String, String, java.lang.String...); Loading Loading @@ -25419,6 +25455,14 @@ package android.media.tv { field public static final String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS"; field public static final String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS"; field public static final String ACTION_VIEW_RECORDING_SCHEDULES = "android.media.tv.action.VIEW_RECORDING_SCHEDULES"; field public static final int BROADCAST_INFO_STREAM_EVENT = 5; // 0x5 field public static final int BROADCAST_INFO_TYPE_COMMAND = 7; // 0x7 field public static final int BROADCAST_INFO_TYPE_DSMCC = 6; // 0x6 field public static final int BROADCAST_INFO_TYPE_PES = 4; // 0x4 field public static final int BROADCAST_INFO_TYPE_SECTION = 3; // 0x3 field public static final int BROADCAST_INFO_TYPE_TABLE = 2; // 0x2 field public static final int BROADCAST_INFO_TYPE_TIMELINE = 8; // 0x8 field public static final int BROADCAST_INFO_TYPE_TS = 1; // 0x1 field public static final int INPUT_STATE_CONNECTED = 0; // 0x0 field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1 field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2 Loading Loading @@ -25508,6 +25552,7 @@ package android.media.tv { method public void layoutSurface(int, int, int, int); method public void notifyAdResponse(@NonNull android.media.tv.AdResponse); method public void notifyAitInfoUpdated(@NonNull android.media.tv.AitInfo); 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); Loading @@ -25527,7 +25572,9 @@ package android.media.tv { method public boolean onKeyUp(int, android.view.KeyEvent); method public void onOverlayViewSizeChanged(int, int); method public abstract void onRelease(); method public void onRemoveBroadcastInfo(int); method public void onRequestAd(@NonNull android.media.tv.AdRequest); method public void onRequestBroadcastInfo(@NonNull android.media.tv.BroadcastInfoRequest); method public boolean onSelectTrack(int, @Nullable String); method public abstract void onSetCaptionEnabled(boolean); method public void onSetInteractiveAppNotificationEnabled(boolean); Loading Loading @@ -25792,6 +25839,7 @@ package android.media.tv.interactive { method public void notifySessionStateChanged(int, int); method public final void notifyTeletextAppStateChanged(int); method public void onAdResponse(@NonNull android.media.tv.AdResponse); method public void onBroadcastInfoResponse(@NonNull android.media.tv.BroadcastInfoResponse); 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); Loading Loading @@ -25823,7 +25871,9 @@ package android.media.tv.interactive { method public void onTuned(@NonNull android.net.Uri); method public void onVideoAvailable(); method public void onVideoUnavailable(int); method public void removeBroadcastInfo(int); method public void requestAd(@NonNull android.media.tv.AdRequest); method public void requestBroadcastInfo(@NonNull android.media.tv.BroadcastInfoRequest); method public void requestCurrentChannelLcn(); method public void requestCurrentChannelUri(); method public void requestCurrentTvInputId(); media/java/android/media/tv/BroadcastInfoRequest.java +45 −8 Original line number Diff line number Diff line Loading @@ -18,19 +18,34 @@ package android.media.tv; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.os.Parcel; import android.os.Parcelable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** @hide */ /** * A request for the information retrieved from broadcast signal. */ @SuppressLint("ParcelNotFinal") public abstract class BroadcastInfoRequest implements Parcelable { /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef({REQUEST_OPTION_REPEAT, REQUEST_OPTION_AUTO_UPDATE}) public @interface RequestOption {} /** * Request option: repeat. * <p>With this option, a response is sent when related broadcast information is detected, * even if the same information has been sent previously. */ public static final int REQUEST_OPTION_REPEAT = 0; /** * Request option: auto update. * <p>With this option, a response is sent only when broadcast information is detected for the * first time, new values are detected. */ public static final int REQUEST_OPTION_AUTO_UPDATE = 1; public static final @NonNull Parcelable.Creator<BroadcastInfoRequest> CREATOR = Loading Loading @@ -66,32 +81,54 @@ public abstract class BroadcastInfoRequest implements Parcelable { } }; protected final @TvInputManager.BroadcastInfoType int mType; protected final int mRequestId; protected final @RequestOption int mOption; private final @TvInputManager.BroadcastInfoType int mType; private final int mRequestId; private final @RequestOption int mOption; protected BroadcastInfoRequest(@TvInputManager.BroadcastInfoType int type, BroadcastInfoRequest(@TvInputManager.BroadcastInfoType int type, int requestId, @RequestOption int option) { mType = type; mRequestId = requestId; mOption = option; } protected BroadcastInfoRequest(@TvInputManager.BroadcastInfoType int type, Parcel source) { BroadcastInfoRequest(@TvInputManager.BroadcastInfoType int type, Parcel source) { mType = type; mRequestId = source.readInt(); mOption = source.readInt(); } public @TvInputManager.BroadcastInfoType int getType() { /** * Gets the broadcast info type. * * <p>The type indicates what broadcast information is requested, such as broadcast table, * PES (packetized Elementary Stream), TS (transport stream), etc. The type of the * request and the related responses should be the same. */ @TvInputManager.BroadcastInfoType public int getType() { return mType; } /** * Gets the ID of the request. * * <p>The ID is used to associate the response with the request. * * @see android.media.tv.BroadcastInfoResponse#getRequestId() */ public int getRequestId() { return mRequestId; } public @RequestOption int getOption() { /** * Gets the request option of the request. * * @see #REQUEST_OPTION_REPEAT * @see #REQUEST_OPTION_AUTO_UPDATE */ @RequestOption public int getOption() { return mOption; } Loading media/java/android/media/tv/BroadcastInfoResponse.java +50 −9 Original line number Diff line number Diff line Loading @@ -18,20 +18,35 @@ package android.media.tv; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.os.Parcel; import android.os.Parcelable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** @hide */ /** * A response of {@link BroadcastInfoRequest} for information retrieved from broadcast signal. */ @SuppressLint("ParcelNotFinal") public abstract class BroadcastInfoResponse implements Parcelable { /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef({RESPONSE_RESULT_ERROR, RESPONSE_RESULT_OK, RESPONSE_RESULT_CANCEL}) public @interface ResponseResult {} /** * Response result: error. This means the request can not be set up successfully. */ public static final int RESPONSE_RESULT_ERROR = 1; /** * Response result: OK. This means the request is set up successfully and the related responses * are normal responses. */ public static final int RESPONSE_RESULT_OK = 2; /** * Response result: cancel. This means the request has been cancelled. */ public static final int RESPONSE_RESULT_CANCEL = 3; public static final @NonNull Parcelable.Creator<BroadcastInfoResponse> CREATOR = Loading Loading @@ -67,12 +82,12 @@ public abstract class BroadcastInfoResponse implements Parcelable { } }; protected final @TvInputManager.BroadcastInfoType int mType; protected final int mRequestId; protected final int mSequence; protected final @ResponseResult int mResponseResult; private final @TvInputManager.BroadcastInfoType int mType; private final int mRequestId; private final int mSequence; private final @ResponseResult int mResponseResult; protected BroadcastInfoResponse(@TvInputManager.BroadcastInfoType int type, int requestId, BroadcastInfoResponse(@TvInputManager.BroadcastInfoType int type, int requestId, int sequence, @ResponseResult int responseResult) { mType = type; mRequestId = requestId; Loading @@ -80,26 +95,52 @@ public abstract class BroadcastInfoResponse implements Parcelable { mResponseResult = responseResult; } protected BroadcastInfoResponse(@TvInputManager.BroadcastInfoType int type, Parcel source) { BroadcastInfoResponse(@TvInputManager.BroadcastInfoType int type, Parcel source) { mType = type; mRequestId = source.readInt(); mSequence = source.readInt(); mResponseResult = source.readInt(); } public @TvInputManager.BroadcastInfoType int getType() { /** * Gets the broadcast info type. * * <p>The type indicates what broadcast information is requested, such as broadcast table, * PES (packetized Elementary Stream), TS (transport stream), etc. The type of the * request and the related responses should be the same. */ @TvInputManager.BroadcastInfoType public int getType() { return mType; } /** * Gets the ID of the request. * * <p>The ID is used to associate the response with the request. * * @see android.media.tv.BroadcastInfoRequest#getRequestId() */ public int getRequestId() { return mRequestId; } /** * Gets the sequence number which indicates the order of related responses. */ public int getSequence() { return mSequence; } public @ResponseResult int getResponseResult() { /** * Gets the result for the response. * * @see #RESPONSE_RESULT_OK * @see #RESPONSE_RESULT_ERROR * @see #RESPONSE_RESULT_CANCEL */ @ResponseResult public int getResponseResult() { return mResponseResult; } Loading media/java/android/media/tv/TsRequest.java +16 −6 Original line number Diff line number Diff line Loading @@ -20,9 +20,11 @@ import android.annotation.NonNull; import android.os.Parcel; import android.os.Parcelable; /** @hide */ /** * A request for TS (transport stream) from broadcast signal. */ public final class TsRequest extends BroadcastInfoRequest implements Parcelable { public static final @TvInputManager.BroadcastInfoType int requestType = static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE = TvInputManager.BROADCAST_INFO_TYPE_TS; public static final @NonNull Parcelable.Creator<TsRequest> CREATOR = Loading @@ -41,24 +43,32 @@ public final class TsRequest extends BroadcastInfoRequest implements Parcelable private final int mTsPid; public static TsRequest createFromParcelBody(Parcel in) { static @NonNull TsRequest createFromParcelBody(@NonNull Parcel in) { return new TsRequest(in); } public TsRequest(int requestId, @RequestOption int option, int tsPid) { super(requestType, requestId, option); super(REQUEST_TYPE, requestId, option); mTsPid = tsPid; } protected TsRequest(Parcel source) { super(requestType, source); TsRequest(@NonNull Parcel source) { super(REQUEST_TYPE, source); mTsPid = source.readInt(); } /** * Gets the packet identifier (PID) of the TS (transport stream). */ public int getTsPid() { return mTsPid; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(@NonNull Parcel dest, int flags) { super.writeToParcel(dest, flags); Loading media/java/android/media/tv/TsResponse.java +21 −7 Original line number Diff line number Diff line Loading @@ -17,12 +17,15 @@ package android.media.tv; import android.annotation.NonNull; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcelable; /** @hide */ /** * A response for TS (transport stream) from broadcast signal. */ public final class TsResponse extends BroadcastInfoResponse implements Parcelable { public static final @TvInputManager.BroadcastInfoType int responseType = static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE = TvInputManager.BROADCAST_INFO_TYPE_TS; public static final @NonNull Parcelable.Creator<TsResponse> CREATOR = Loading @@ -41,25 +44,36 @@ public final class TsResponse extends BroadcastInfoResponse implements Parcelabl private final String mSharedFilterToken; public static TsResponse createFromParcelBody(Parcel in) { static @NonNull TsResponse createFromParcelBody(@NonNull Parcel in) { return new TsResponse(in); } public TsResponse(int requestId, int sequence, @ResponseResult int responseResult, String sharedFilterToken) { super(responseType, requestId, sequence, responseResult); @NonNull String sharedFilterToken) { super(RESPONSE_TYPE, requestId, sequence, responseResult); this.mSharedFilterToken = sharedFilterToken; } protected TsResponse(Parcel source) { super(responseType, source); TsResponse(Parcel source) { super(RESPONSE_TYPE, source); mSharedFilterToken = source.readString(); } /** * Gets a token of SharedFilter. * * <p>The token can be used to retrieve the transport stream from the filter. */ @Nullable public String getSharedFilterToken() { return mSharedFilterToken; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(@NonNull Parcel dest, int flags) { super.writeToParcel(dest, flags); Loading Loading
core/api/current.txt +50 −0 Original line number Diff line number Diff line Loading @@ -24933,6 +24933,42 @@ package android.media.tv { field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.AitInfo> CREATOR; } public abstract class BroadcastInfoRequest implements android.os.Parcelable { method public int describeContents(); method public int getOption(); method public int getRequestId(); method public int getType(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.BroadcastInfoRequest> CREATOR; field public static final int REQUEST_OPTION_AUTO_UPDATE = 1; // 0x1 field public static final int REQUEST_OPTION_REPEAT = 0; // 0x0 } public abstract class BroadcastInfoResponse implements android.os.Parcelable { method public int describeContents(); method public int getRequestId(); method public int getResponseResult(); method public int getSequence(); method public int getType(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.BroadcastInfoResponse> CREATOR; field public static final int RESPONSE_RESULT_CANCEL = 3; // 0x3 field public static final int RESPONSE_RESULT_ERROR = 1; // 0x1 field public static final int RESPONSE_RESULT_OK = 2; // 0x2 } public final class TsRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable { ctor public TsRequest(int, int, int); method public int getTsPid(); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TsRequest> CREATOR; } public final class TsResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable { ctor public TsResponse(int, int, int, @NonNull String); method @Nullable public String getSharedFilterToken(); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TsResponse> CREATOR; } public final class TvContentRating { method public boolean contains(@NonNull android.media.tv.TvContentRating); method public static android.media.tv.TvContentRating createRating(String, String, String, java.lang.String...); Loading Loading @@ -25419,6 +25455,14 @@ package android.media.tv { field public static final String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS"; field public static final String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS"; field public static final String ACTION_VIEW_RECORDING_SCHEDULES = "android.media.tv.action.VIEW_RECORDING_SCHEDULES"; field public static final int BROADCAST_INFO_STREAM_EVENT = 5; // 0x5 field public static final int BROADCAST_INFO_TYPE_COMMAND = 7; // 0x7 field public static final int BROADCAST_INFO_TYPE_DSMCC = 6; // 0x6 field public static final int BROADCAST_INFO_TYPE_PES = 4; // 0x4 field public static final int BROADCAST_INFO_TYPE_SECTION = 3; // 0x3 field public static final int BROADCAST_INFO_TYPE_TABLE = 2; // 0x2 field public static final int BROADCAST_INFO_TYPE_TIMELINE = 8; // 0x8 field public static final int BROADCAST_INFO_TYPE_TS = 1; // 0x1 field public static final int INPUT_STATE_CONNECTED = 0; // 0x0 field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1 field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2 Loading Loading @@ -25508,6 +25552,7 @@ package android.media.tv { method public void layoutSurface(int, int, int, int); method public void notifyAdResponse(@NonNull android.media.tv.AdResponse); method public void notifyAitInfoUpdated(@NonNull android.media.tv.AitInfo); 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); Loading @@ -25527,7 +25572,9 @@ package android.media.tv { method public boolean onKeyUp(int, android.view.KeyEvent); method public void onOverlayViewSizeChanged(int, int); method public abstract void onRelease(); method public void onRemoveBroadcastInfo(int); method public void onRequestAd(@NonNull android.media.tv.AdRequest); method public void onRequestBroadcastInfo(@NonNull android.media.tv.BroadcastInfoRequest); method public boolean onSelectTrack(int, @Nullable String); method public abstract void onSetCaptionEnabled(boolean); method public void onSetInteractiveAppNotificationEnabled(boolean); Loading Loading @@ -25792,6 +25839,7 @@ package android.media.tv.interactive { method public void notifySessionStateChanged(int, int); method public final void notifyTeletextAppStateChanged(int); method public void onAdResponse(@NonNull android.media.tv.AdResponse); method public void onBroadcastInfoResponse(@NonNull android.media.tv.BroadcastInfoResponse); 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); Loading Loading @@ -25823,7 +25871,9 @@ package android.media.tv.interactive { method public void onTuned(@NonNull android.net.Uri); method public void onVideoAvailable(); method public void onVideoUnavailable(int); method public void removeBroadcastInfo(int); method public void requestAd(@NonNull android.media.tv.AdRequest); method public void requestBroadcastInfo(@NonNull android.media.tv.BroadcastInfoRequest); method public void requestCurrentChannelLcn(); method public void requestCurrentChannelUri(); method public void requestCurrentTvInputId();
media/java/android/media/tv/BroadcastInfoRequest.java +45 −8 Original line number Diff line number Diff line Loading @@ -18,19 +18,34 @@ package android.media.tv; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.os.Parcel; import android.os.Parcelable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** @hide */ /** * A request for the information retrieved from broadcast signal. */ @SuppressLint("ParcelNotFinal") public abstract class BroadcastInfoRequest implements Parcelable { /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef({REQUEST_OPTION_REPEAT, REQUEST_OPTION_AUTO_UPDATE}) public @interface RequestOption {} /** * Request option: repeat. * <p>With this option, a response is sent when related broadcast information is detected, * even if the same information has been sent previously. */ public static final int REQUEST_OPTION_REPEAT = 0; /** * Request option: auto update. * <p>With this option, a response is sent only when broadcast information is detected for the * first time, new values are detected. */ public static final int REQUEST_OPTION_AUTO_UPDATE = 1; public static final @NonNull Parcelable.Creator<BroadcastInfoRequest> CREATOR = Loading Loading @@ -66,32 +81,54 @@ public abstract class BroadcastInfoRequest implements Parcelable { } }; protected final @TvInputManager.BroadcastInfoType int mType; protected final int mRequestId; protected final @RequestOption int mOption; private final @TvInputManager.BroadcastInfoType int mType; private final int mRequestId; private final @RequestOption int mOption; protected BroadcastInfoRequest(@TvInputManager.BroadcastInfoType int type, BroadcastInfoRequest(@TvInputManager.BroadcastInfoType int type, int requestId, @RequestOption int option) { mType = type; mRequestId = requestId; mOption = option; } protected BroadcastInfoRequest(@TvInputManager.BroadcastInfoType int type, Parcel source) { BroadcastInfoRequest(@TvInputManager.BroadcastInfoType int type, Parcel source) { mType = type; mRequestId = source.readInt(); mOption = source.readInt(); } public @TvInputManager.BroadcastInfoType int getType() { /** * Gets the broadcast info type. * * <p>The type indicates what broadcast information is requested, such as broadcast table, * PES (packetized Elementary Stream), TS (transport stream), etc. The type of the * request and the related responses should be the same. */ @TvInputManager.BroadcastInfoType public int getType() { return mType; } /** * Gets the ID of the request. * * <p>The ID is used to associate the response with the request. * * @see android.media.tv.BroadcastInfoResponse#getRequestId() */ public int getRequestId() { return mRequestId; } public @RequestOption int getOption() { /** * Gets the request option of the request. * * @see #REQUEST_OPTION_REPEAT * @see #REQUEST_OPTION_AUTO_UPDATE */ @RequestOption public int getOption() { return mOption; } Loading
media/java/android/media/tv/BroadcastInfoResponse.java +50 −9 Original line number Diff line number Diff line Loading @@ -18,20 +18,35 @@ package android.media.tv; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.os.Parcel; import android.os.Parcelable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** @hide */ /** * A response of {@link BroadcastInfoRequest} for information retrieved from broadcast signal. */ @SuppressLint("ParcelNotFinal") public abstract class BroadcastInfoResponse implements Parcelable { /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef({RESPONSE_RESULT_ERROR, RESPONSE_RESULT_OK, RESPONSE_RESULT_CANCEL}) public @interface ResponseResult {} /** * Response result: error. This means the request can not be set up successfully. */ public static final int RESPONSE_RESULT_ERROR = 1; /** * Response result: OK. This means the request is set up successfully and the related responses * are normal responses. */ public static final int RESPONSE_RESULT_OK = 2; /** * Response result: cancel. This means the request has been cancelled. */ public static final int RESPONSE_RESULT_CANCEL = 3; public static final @NonNull Parcelable.Creator<BroadcastInfoResponse> CREATOR = Loading Loading @@ -67,12 +82,12 @@ public abstract class BroadcastInfoResponse implements Parcelable { } }; protected final @TvInputManager.BroadcastInfoType int mType; protected final int mRequestId; protected final int mSequence; protected final @ResponseResult int mResponseResult; private final @TvInputManager.BroadcastInfoType int mType; private final int mRequestId; private final int mSequence; private final @ResponseResult int mResponseResult; protected BroadcastInfoResponse(@TvInputManager.BroadcastInfoType int type, int requestId, BroadcastInfoResponse(@TvInputManager.BroadcastInfoType int type, int requestId, int sequence, @ResponseResult int responseResult) { mType = type; mRequestId = requestId; Loading @@ -80,26 +95,52 @@ public abstract class BroadcastInfoResponse implements Parcelable { mResponseResult = responseResult; } protected BroadcastInfoResponse(@TvInputManager.BroadcastInfoType int type, Parcel source) { BroadcastInfoResponse(@TvInputManager.BroadcastInfoType int type, Parcel source) { mType = type; mRequestId = source.readInt(); mSequence = source.readInt(); mResponseResult = source.readInt(); } public @TvInputManager.BroadcastInfoType int getType() { /** * Gets the broadcast info type. * * <p>The type indicates what broadcast information is requested, such as broadcast table, * PES (packetized Elementary Stream), TS (transport stream), etc. The type of the * request and the related responses should be the same. */ @TvInputManager.BroadcastInfoType public int getType() { return mType; } /** * Gets the ID of the request. * * <p>The ID is used to associate the response with the request. * * @see android.media.tv.BroadcastInfoRequest#getRequestId() */ public int getRequestId() { return mRequestId; } /** * Gets the sequence number which indicates the order of related responses. */ public int getSequence() { return mSequence; } public @ResponseResult int getResponseResult() { /** * Gets the result for the response. * * @see #RESPONSE_RESULT_OK * @see #RESPONSE_RESULT_ERROR * @see #RESPONSE_RESULT_CANCEL */ @ResponseResult public int getResponseResult() { return mResponseResult; } Loading
media/java/android/media/tv/TsRequest.java +16 −6 Original line number Diff line number Diff line Loading @@ -20,9 +20,11 @@ import android.annotation.NonNull; import android.os.Parcel; import android.os.Parcelable; /** @hide */ /** * A request for TS (transport stream) from broadcast signal. */ public final class TsRequest extends BroadcastInfoRequest implements Parcelable { public static final @TvInputManager.BroadcastInfoType int requestType = static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE = TvInputManager.BROADCAST_INFO_TYPE_TS; public static final @NonNull Parcelable.Creator<TsRequest> CREATOR = Loading @@ -41,24 +43,32 @@ public final class TsRequest extends BroadcastInfoRequest implements Parcelable private final int mTsPid; public static TsRequest createFromParcelBody(Parcel in) { static @NonNull TsRequest createFromParcelBody(@NonNull Parcel in) { return new TsRequest(in); } public TsRequest(int requestId, @RequestOption int option, int tsPid) { super(requestType, requestId, option); super(REQUEST_TYPE, requestId, option); mTsPid = tsPid; } protected TsRequest(Parcel source) { super(requestType, source); TsRequest(@NonNull Parcel source) { super(REQUEST_TYPE, source); mTsPid = source.readInt(); } /** * Gets the packet identifier (PID) of the TS (transport stream). */ public int getTsPid() { return mTsPid; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(@NonNull Parcel dest, int flags) { super.writeToParcel(dest, flags); Loading
media/java/android/media/tv/TsResponse.java +21 −7 Original line number Diff line number Diff line Loading @@ -17,12 +17,15 @@ package android.media.tv; import android.annotation.NonNull; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcelable; /** @hide */ /** * A response for TS (transport stream) from broadcast signal. */ public final class TsResponse extends BroadcastInfoResponse implements Parcelable { public static final @TvInputManager.BroadcastInfoType int responseType = static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE = TvInputManager.BROADCAST_INFO_TYPE_TS; public static final @NonNull Parcelable.Creator<TsResponse> CREATOR = Loading @@ -41,25 +44,36 @@ public final class TsResponse extends BroadcastInfoResponse implements Parcelabl private final String mSharedFilterToken; public static TsResponse createFromParcelBody(Parcel in) { static @NonNull TsResponse createFromParcelBody(@NonNull Parcel in) { return new TsResponse(in); } public TsResponse(int requestId, int sequence, @ResponseResult int responseResult, String sharedFilterToken) { super(responseType, requestId, sequence, responseResult); @NonNull String sharedFilterToken) { super(RESPONSE_TYPE, requestId, sequence, responseResult); this.mSharedFilterToken = sharedFilterToken; } protected TsResponse(Parcel source) { super(responseType, source); TsResponse(Parcel source) { super(RESPONSE_TYPE, source); mSharedFilterToken = source.readString(); } /** * Gets a token of SharedFilter. * * <p>The token can be used to retrieve the transport stream from the filter. */ @Nullable public String getSharedFilterToken() { return mSharedFilterToken; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(@NonNull Parcel dest, int flags) { super.writeToParcel(dest, flags); Loading