Merge changes from topic "tiaf_cts_broadcastInfo"
* changes: TIAF: unhide broadcastInfo related classes and functions 2 TIAF: unhide broadcastInfo related classes and functions
This commit is contained in:
@@ -24946,6 +24946,156 @@ 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 CommandRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable {
|
||||
ctor public CommandRequest(int, int, @NonNull String, @NonNull String, @NonNull String);
|
||||
method @NonNull public String getArguments();
|
||||
method @NonNull public String getName();
|
||||
method @NonNull public String getNameSpace();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.CommandRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class CommandResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable {
|
||||
ctor public CommandResponse(int, int, int, @Nullable String);
|
||||
method @Nullable public String getResponse();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.CommandResponse> CREATOR;
|
||||
}
|
||||
|
||||
public final class DsmccRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable {
|
||||
ctor public DsmccRequest(int, int, @NonNull android.net.Uri);
|
||||
method @NonNull public android.net.Uri getUri();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.DsmccRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class DsmccResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable {
|
||||
ctor public DsmccResponse(int, int, int, @Nullable android.os.ParcelFileDescriptor);
|
||||
ctor public DsmccResponse(int, int, int, boolean, @Nullable java.util.List<java.lang.String>);
|
||||
ctor public DsmccResponse(int, int, int, @Nullable int[], @Nullable String[]);
|
||||
method @NonNull public String getBiopMessageType();
|
||||
method @NonNull public java.util.List<java.lang.String> getChildList();
|
||||
method @NonNull public android.os.ParcelFileDescriptor getFile();
|
||||
method @NonNull public int[] getStreamEventIds();
|
||||
method @NonNull public String[] getStreamEventNames();
|
||||
field public static final String BIOP_MESSAGE_TYPE_DIRECTORY = "directory";
|
||||
field public static final String BIOP_MESSAGE_TYPE_FILE = "file";
|
||||
field public static final String BIOP_MESSAGE_TYPE_SERVICE_GATEWAY = "service_gateway";
|
||||
field public static final String BIOP_MESSAGE_TYPE_STREAM = "stream";
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.DsmccResponse> CREATOR;
|
||||
}
|
||||
|
||||
public final class PesRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable {
|
||||
ctor public PesRequest(int, int, int, int);
|
||||
method public int getStreamId();
|
||||
method public int getTsPid();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.PesRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class PesResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable {
|
||||
ctor public PesResponse(int, int, int, @Nullable String);
|
||||
method @Nullable public String getSharedFilterToken();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.PesResponse> CREATOR;
|
||||
}
|
||||
|
||||
public final class SectionRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable {
|
||||
ctor public SectionRequest(int, int, int, int, int);
|
||||
method public int getTableId();
|
||||
method public int getTsPid();
|
||||
method public int getVersion();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.SectionRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class SectionResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable {
|
||||
ctor public SectionResponse(int, int, int, int, int, @Nullable android.os.Bundle);
|
||||
method @NonNull public android.os.Bundle getSessionData();
|
||||
method public int getSessionId();
|
||||
method public int getVersion();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.SectionResponse> CREATOR;
|
||||
}
|
||||
|
||||
public final class StreamEventRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable {
|
||||
ctor public StreamEventRequest(int, int, @NonNull android.net.Uri, @NonNull String);
|
||||
method @NonNull public String getEventName();
|
||||
method @NonNull public android.net.Uri getTargetUri();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.StreamEventRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class StreamEventResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable {
|
||||
ctor public StreamEventResponse(int, int, int, int, long, @Nullable byte[]);
|
||||
method @Nullable public byte[] getData();
|
||||
method public int getEventId();
|
||||
method public long getNpt();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.StreamEventResponse> CREATOR;
|
||||
}
|
||||
|
||||
public final class TableRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable {
|
||||
ctor public TableRequest(int, int, int, int, int);
|
||||
method public int getTableId();
|
||||
method public int getTableName();
|
||||
method public int getVersion();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TableRequest> CREATOR;
|
||||
field public static final int TABLE_NAME_PAT = 0; // 0x0
|
||||
field public static final int TABLE_NAME_PMT = 1; // 0x1
|
||||
}
|
||||
|
||||
public final class TableResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable {
|
||||
ctor public TableResponse(int, int, int, @Nullable android.net.Uri, int, int);
|
||||
method public int getSize();
|
||||
method @Nullable public android.net.Uri getTableUri();
|
||||
method public int getVersion();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TableResponse> CREATOR;
|
||||
}
|
||||
|
||||
public final class TimelineRequest extends android.media.tv.BroadcastInfoRequest implements android.os.Parcelable {
|
||||
ctor public TimelineRequest(int, int, int);
|
||||
method public int getIntervalMillis();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TimelineRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class TimelineResponse extends android.media.tv.BroadcastInfoResponse implements android.os.Parcelable {
|
||||
ctor public TimelineResponse(int, int, int, @Nullable String, int, int, long, long);
|
||||
method @Nullable public String getSelector();
|
||||
method public long getTicks();
|
||||
method public int getUnitsPerSecond();
|
||||
method public int getUnitsPerTick();
|
||||
method public long getWallClock();
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TimelineResponse> CREATOR;
|
||||
}
|
||||
|
||||
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, @Nullable 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...);
|
||||
@@ -25432,6 +25582,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
|
||||
@@ -25521,6 +25679,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);
|
||||
@@ -25540,7 +25699,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);
|
||||
@@ -25805,6 +25966,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);
|
||||
@@ -25836,7 +25998,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();
|
||||
|
||||
@@ -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 =
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 =
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,11 @@ import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A request for command from broadcast signal.
|
||||
*/
|
||||
public final class CommandRequest extends BroadcastInfoRequest implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int requestType =
|
||||
private static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_COMMAND;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<CommandRequest> CREATOR =
|
||||
@@ -43,37 +45,55 @@ public final class CommandRequest extends BroadcastInfoRequest implements Parcel
|
||||
private final String mName;
|
||||
private final String mArguments;
|
||||
|
||||
public static CommandRequest createFromParcelBody(Parcel in) {
|
||||
static CommandRequest createFromParcelBody(Parcel in) {
|
||||
return new CommandRequest(in);
|
||||
}
|
||||
|
||||
public CommandRequest(int requestId, @RequestOption int option, String nameSpace,
|
||||
String name, String arguments) {
|
||||
super(requestType, requestId, option);
|
||||
public CommandRequest(int requestId, @RequestOption int option, @NonNull String nameSpace,
|
||||
@NonNull String name, @NonNull String arguments) {
|
||||
super(REQUEST_TYPE, requestId, option);
|
||||
mNameSpace = nameSpace;
|
||||
mName = name;
|
||||
mArguments = arguments;
|
||||
}
|
||||
|
||||
protected CommandRequest(Parcel source) {
|
||||
super(requestType, source);
|
||||
CommandRequest(Parcel source) {
|
||||
super(REQUEST_TYPE, source);
|
||||
mNameSpace = source.readString();
|
||||
mName = source.readString();
|
||||
mArguments = source.readString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the namespace of the command.
|
||||
*/
|
||||
@NonNull
|
||||
public String getNameSpace() {
|
||||
return mNameSpace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of the command.
|
||||
*/
|
||||
@NonNull
|
||||
public String getName() {
|
||||
return mName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the arguments of the command.
|
||||
* It could be serialized from some formats, such as JSON, XML, etc.
|
||||
*/
|
||||
@NonNull
|
||||
public String getArguments() {
|
||||
return mArguments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -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 command from broadcast signal.
|
||||
*/
|
||||
public final class CommandResponse extends BroadcastInfoResponse implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int responseType =
|
||||
private static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_COMMAND;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<CommandResponse> CREATOR =
|
||||
@@ -41,25 +44,35 @@ public final class CommandResponse extends BroadcastInfoResponse implements Parc
|
||||
|
||||
private final String mResponse;
|
||||
|
||||
public static CommandResponse createFromParcelBody(Parcel in) {
|
||||
static CommandResponse createFromParcelBody(Parcel in) {
|
||||
return new CommandResponse(in);
|
||||
}
|
||||
|
||||
public CommandResponse(int requestId, int sequence,
|
||||
@ResponseResult int responseResult, String response) {
|
||||
super(responseType, requestId, sequence, responseResult);
|
||||
@ResponseResult int responseResult, @Nullable String response) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
mResponse = response;
|
||||
}
|
||||
|
||||
protected CommandResponse(Parcel source) {
|
||||
super(responseType, source);
|
||||
CommandResponse(Parcel source) {
|
||||
super(RESPONSE_TYPE, source);
|
||||
mResponse = source.readString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the response of the command.
|
||||
* It could be serialized from some formats, such as JSON, XML, etc.
|
||||
*/
|
||||
@Nullable
|
||||
public String getResponse() {
|
||||
return mResponse;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -21,9 +21,11 @@ import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A request for DSM-CC from broadcast signal.
|
||||
*/
|
||||
public final class DsmccRequest extends BroadcastInfoRequest implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int requestType =
|
||||
private static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_DSMCC;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<DsmccRequest> CREATOR =
|
||||
@@ -42,25 +44,34 @@ public final class DsmccRequest extends BroadcastInfoRequest implements Parcelab
|
||||
|
||||
private final Uri mUri;
|
||||
|
||||
public static DsmccRequest createFromParcelBody(Parcel in) {
|
||||
static DsmccRequest createFromParcelBody(Parcel in) {
|
||||
return new DsmccRequest(in);
|
||||
}
|
||||
|
||||
public DsmccRequest(int requestId, @RequestOption int option, Uri uri) {
|
||||
super(requestType, requestId, option);
|
||||
public DsmccRequest(int requestId, @RequestOption int option, @NonNull Uri uri) {
|
||||
super(REQUEST_TYPE, requestId, option);
|
||||
mUri = uri;
|
||||
}
|
||||
|
||||
protected DsmccRequest(Parcel source) {
|
||||
super(requestType, source);
|
||||
DsmccRequest(Parcel source) {
|
||||
super(REQUEST_TYPE, source);
|
||||
String uriString = source.readString();
|
||||
mUri = uriString == null ? null : Uri.parse(uriString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URI for DSM-CC object.
|
||||
*/
|
||||
@NonNull
|
||||
public Uri getUri() {
|
||||
return mUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.media.tv;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.StringDef;
|
||||
import android.os.Parcel;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
@@ -27,9 +28,11 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A response for DSM-CC from broadcast signal.
|
||||
*/
|
||||
public final class DsmccResponse extends BroadcastInfoResponse implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int responseType =
|
||||
private static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_DSMCC;
|
||||
|
||||
/** @hide */
|
||||
@@ -73,7 +76,7 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
private final int[] mEventIds;
|
||||
private final String[] mEventNames;
|
||||
|
||||
public static DsmccResponse createFromParcelBody(Parcel in) {
|
||||
static DsmccResponse createFromParcelBody(Parcel in) {
|
||||
return new DsmccResponse(in);
|
||||
}
|
||||
|
||||
@@ -81,8 +84,8 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
* Constructs a BIOP file message response.
|
||||
*/
|
||||
public DsmccResponse(int requestId, int sequence, @ResponseResult int responseResult,
|
||||
@NonNull ParcelFileDescriptor file) {
|
||||
super(responseType, requestId, sequence, responseResult);
|
||||
@Nullable ParcelFileDescriptor file) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
mBiopMessageType = BIOP_MESSAGE_TYPE_FILE;
|
||||
mFileDescriptor = file;
|
||||
mChildList = null;
|
||||
@@ -94,8 +97,8 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
* Constructs a BIOP service gateway or directory message response.
|
||||
*/
|
||||
public DsmccResponse(int requestId, int sequence, @ResponseResult int responseResult,
|
||||
boolean isServiceGateway, @NonNull List<String> childList) {
|
||||
super(responseType, requestId, sequence, responseResult);
|
||||
boolean isServiceGateway, @Nullable List<String> childList) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
if (isServiceGateway) {
|
||||
mBiopMessageType = BIOP_MESSAGE_TYPE_SERVICE_GATEWAY;
|
||||
} else {
|
||||
@@ -114,8 +117,8 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
* stream event message type.
|
||||
*/
|
||||
public DsmccResponse(int requestId, int sequence, @ResponseResult int responseResult,
|
||||
@NonNull int[] eventIds, @NonNull String[] eventNames) {
|
||||
super(responseType, requestId, sequence, responseResult);
|
||||
@Nullable int[] eventIds, @Nullable String[] eventNames) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
mBiopMessageType = BIOP_MESSAGE_TYPE_STREAM;
|
||||
mFileDescriptor = null;
|
||||
mChildList = null;
|
||||
@@ -127,7 +130,7 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
}
|
||||
|
||||
private DsmccResponse(@NonNull Parcel source) {
|
||||
super(responseType, source);
|
||||
super(RESPONSE_TYPE, source);
|
||||
|
||||
mBiopMessageType = source.readString();
|
||||
switch (mBiopMessageType) {
|
||||
@@ -164,13 +167,17 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the BIOP message type */
|
||||
/**
|
||||
* Returns the BIOP message type.
|
||||
*/
|
||||
@NonNull
|
||||
public @BiopMessageType String getBiopMessageType() {
|
||||
return mBiopMessageType;
|
||||
}
|
||||
|
||||
/** Returns the file descriptor for a given file message response */
|
||||
/**
|
||||
* Returns the file descriptor for a given file message response.
|
||||
*/
|
||||
@NonNull
|
||||
public ParcelFileDescriptor getFile() {
|
||||
if (!mBiopMessageType.equals(BIOP_MESSAGE_TYPE_FILE)) {
|
||||
@@ -192,7 +199,9 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
return new ArrayList<String>(mChildList);
|
||||
}
|
||||
|
||||
/** Returns all event IDs carried in a given stream message response. */
|
||||
/**
|
||||
* Returns all event IDs carried in a given stream message response.
|
||||
*/
|
||||
@NonNull
|
||||
public int[] getStreamEventIds() {
|
||||
if (!mBiopMessageType.equals(BIOP_MESSAGE_TYPE_STREAM)) {
|
||||
@@ -201,7 +210,9 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
return mEventIds;
|
||||
}
|
||||
|
||||
/** Returns all event names carried in a given stream message response */
|
||||
/**
|
||||
* Returns all event names carried in a given stream message response.
|
||||
*/
|
||||
@NonNull
|
||||
public String[] getStreamEventNames() {
|
||||
if (!mBiopMessageType.equals(BIOP_MESSAGE_TYPE_STREAM)) {
|
||||
@@ -210,6 +221,11 @@ public final class DsmccResponse extends BroadcastInfoResponse implements Parcel
|
||||
return mEventNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -20,9 +20,11 @@ import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A request for PES from broadcast signal.
|
||||
*/
|
||||
public final class PesRequest extends BroadcastInfoRequest implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int requestType =
|
||||
private static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_PES;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<PesRequest> CREATOR =
|
||||
@@ -42,30 +44,41 @@ public final class PesRequest extends BroadcastInfoRequest implements Parcelable
|
||||
private final int mTsPid;
|
||||
private final int mStreamId;
|
||||
|
||||
public static PesRequest createFromParcelBody(Parcel in) {
|
||||
static PesRequest createFromParcelBody(Parcel in) {
|
||||
return new PesRequest(in);
|
||||
}
|
||||
|
||||
public PesRequest(int requestId, @RequestOption int option, int tsPid, int streamId) {
|
||||
super(requestType, requestId, option);
|
||||
super(REQUEST_TYPE, requestId, option);
|
||||
mTsPid = tsPid;
|
||||
mStreamId = streamId;
|
||||
}
|
||||
|
||||
protected PesRequest(Parcel source) {
|
||||
super(requestType, source);
|
||||
PesRequest(Parcel source) {
|
||||
super(REQUEST_TYPE, source);
|
||||
mTsPid = source.readInt();
|
||||
mStreamId = source.readInt();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the packet identifier (PID) of the TS (transport stream).
|
||||
*/
|
||||
public int getTsPid() {
|
||||
return mTsPid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the StreamID of requested PES.
|
||||
*/
|
||||
public int getStreamId() {
|
||||
return mStreamId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -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 PES from broadcast signal.
|
||||
*/
|
||||
public final class PesResponse extends BroadcastInfoResponse implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int responseType =
|
||||
private static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_PES;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<PesResponse> CREATOR =
|
||||
@@ -41,25 +44,34 @@ public final class PesResponse extends BroadcastInfoResponse implements Parcelab
|
||||
|
||||
private final String mSharedFilterToken;
|
||||
|
||||
public static PesResponse createFromParcelBody(Parcel in) {
|
||||
static PesResponse createFromParcelBody(Parcel in) {
|
||||
return new PesResponse(in);
|
||||
}
|
||||
|
||||
public PesResponse(int requestId, int sequence, @ResponseResult int responseResult,
|
||||
String sharedFilterToken) {
|
||||
super(responseType, requestId, sequence, responseResult);
|
||||
@Nullable String sharedFilterToken) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
mSharedFilterToken = sharedFilterToken;
|
||||
}
|
||||
|
||||
protected PesResponse(Parcel source) {
|
||||
super(responseType, source);
|
||||
PesResponse(Parcel source) {
|
||||
super(RESPONSE_TYPE, source);
|
||||
mSharedFilterToken = source.readString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token for a shared filter from Tv Input Service.
|
||||
*/
|
||||
@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);
|
||||
|
||||
@@ -20,9 +20,11 @@ import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A request for Section from broadcast signal.
|
||||
*/
|
||||
public final class SectionRequest extends BroadcastInfoRequest implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int requestType =
|
||||
private static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_SECTION;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<SectionRequest> CREATOR =
|
||||
@@ -41,44 +43,58 @@ public final class SectionRequest extends BroadcastInfoRequest implements Parcel
|
||||
|
||||
private final int mTsPid;
|
||||
private final int mTableId;
|
||||
private final Integer mVersion;
|
||||
private final int mVersion;
|
||||
|
||||
public static SectionRequest createFromParcelBody(Parcel in) {
|
||||
static SectionRequest createFromParcelBody(Parcel in) {
|
||||
return new SectionRequest(in);
|
||||
}
|
||||
|
||||
public SectionRequest(int requestId, @RequestOption int option, int tsPid, int tableId,
|
||||
Integer version) {
|
||||
super(requestType, requestId, option);
|
||||
int version) {
|
||||
super(REQUEST_TYPE, requestId, option);
|
||||
mTsPid = tsPid;
|
||||
mTableId = tableId;
|
||||
mVersion = version;
|
||||
}
|
||||
|
||||
protected SectionRequest(Parcel source) {
|
||||
super(requestType, source);
|
||||
SectionRequest(Parcel source) {
|
||||
super(REQUEST_TYPE, source);
|
||||
mTsPid = source.readInt();
|
||||
mTableId = source.readInt();
|
||||
mVersion = (Integer) source.readValue(Integer.class.getClassLoader());
|
||||
mVersion = source.readInt();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the packet identifier (PID) of the TS (transport stream).
|
||||
*/
|
||||
public int getTsPid() {
|
||||
return mTsPid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ID of the requested table.
|
||||
*/
|
||||
public int getTableId() {
|
||||
return mTableId;
|
||||
}
|
||||
|
||||
public Integer getVersion() {
|
||||
/**
|
||||
* Gets the version number of requested session. If it is null, value will be -1.
|
||||
*/
|
||||
public int getVersion() {
|
||||
return mVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
dest.writeInt(mTsPid);
|
||||
dest.writeInt(mTableId);
|
||||
dest.writeValue(mVersion);
|
||||
dest.writeInt(mVersion);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,16 @@
|
||||
package android.media.tv;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A response for Section from broadcast signal.
|
||||
*/
|
||||
public final class SectionResponse extends BroadcastInfoResponse implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int responseType =
|
||||
private static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_SECTION;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<SectionResponse> CREATOR =
|
||||
@@ -44,37 +47,52 @@ public final class SectionResponse extends BroadcastInfoResponse implements Parc
|
||||
private final int mVersion;
|
||||
private final Bundle mSessionData;
|
||||
|
||||
public static SectionResponse createFromParcelBody(Parcel in) {
|
||||
static SectionResponse createFromParcelBody(Parcel in) {
|
||||
return new SectionResponse(in);
|
||||
}
|
||||
|
||||
public SectionResponse(int requestId, int sequence, @ResponseResult int responseResult,
|
||||
int sessionId, int version, Bundle sessionData) {
|
||||
super(responseType, requestId, sequence, responseResult);
|
||||
int sessionId, int version, @Nullable Bundle sessionData) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
mSessionId = sessionId;
|
||||
mVersion = version;
|
||||
mSessionData = sessionData;
|
||||
}
|
||||
|
||||
protected SectionResponse(Parcel source) {
|
||||
super(responseType, source);
|
||||
SectionResponse(Parcel source) {
|
||||
super(RESPONSE_TYPE, source);
|
||||
mSessionId = source.readInt();
|
||||
mVersion = source.readInt();
|
||||
mSessionData = source.readBundle();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Session Id of requested session.
|
||||
*/
|
||||
public int getSessionId() {
|
||||
return mSessionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Version number of requested session.
|
||||
*/
|
||||
public int getVersion() {
|
||||
return mVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the raw data of session.
|
||||
*/
|
||||
@NonNull
|
||||
public Bundle getSessionData() {
|
||||
return mSessionData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -21,9 +21,11 @@ import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A request for Stream Event from broadcast signal.
|
||||
*/
|
||||
public final class StreamEventRequest extends BroadcastInfoRequest implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int requestType =
|
||||
private static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_STREAM_EVENT;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<StreamEventRequest> CREATOR =
|
||||
@@ -43,32 +45,45 @@ public final class StreamEventRequest extends BroadcastInfoRequest implements Pa
|
||||
private final Uri mTargetUri;
|
||||
private final String mEventName;
|
||||
|
||||
public static StreamEventRequest createFromParcelBody(Parcel in) {
|
||||
static StreamEventRequest createFromParcelBody(Parcel in) {
|
||||
return new StreamEventRequest(in);
|
||||
}
|
||||
|
||||
public StreamEventRequest(int requestId, @RequestOption int option, Uri targetUri,
|
||||
String eventName) {
|
||||
super(requestType, requestId, option);
|
||||
public StreamEventRequest(int requestId, @RequestOption int option, @NonNull Uri targetUri,
|
||||
@NonNull String eventName) {
|
||||
super(REQUEST_TYPE, requestId, option);
|
||||
this.mTargetUri = targetUri;
|
||||
this.mEventName = eventName;
|
||||
}
|
||||
|
||||
protected StreamEventRequest(Parcel source) {
|
||||
super(requestType, source);
|
||||
StreamEventRequest(Parcel source) {
|
||||
super(REQUEST_TYPE, source);
|
||||
String uriString = source.readString();
|
||||
mTargetUri = uriString == null ? null : Uri.parse(uriString);
|
||||
mEventName = source.readString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URI for the DSM-CC Object or the event description file describing the event.
|
||||
*/
|
||||
@NonNull
|
||||
public Uri getTargetUri() {
|
||||
return mTargetUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of the event.
|
||||
*/
|
||||
@NonNull
|
||||
public String getEventName() {
|
||||
return mEventName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -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 Stream Event from broadcast signal.
|
||||
*/
|
||||
public final class StreamEventResponse extends BroadcastInfoResponse implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int responseType =
|
||||
private static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_STREAM_EVENT;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<StreamEventResponse> CREATOR =
|
||||
@@ -43,20 +46,20 @@ public final class StreamEventResponse extends BroadcastInfoResponse implements
|
||||
private final long mNpt;
|
||||
private final byte[] mData;
|
||||
|
||||
public static StreamEventResponse createFromParcelBody(Parcel in) {
|
||||
static StreamEventResponse createFromParcelBody(Parcel in) {
|
||||
return new StreamEventResponse(in);
|
||||
}
|
||||
|
||||
public StreamEventResponse(int requestId, int sequence, @ResponseResult int responseResult,
|
||||
int eventId, long npt, @NonNull byte[] data) {
|
||||
super(responseType, requestId, sequence, responseResult);
|
||||
int eventId, long npt, @Nullable byte[] data) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
mEventId = eventId;
|
||||
mNpt = npt;
|
||||
mData = data;
|
||||
}
|
||||
|
||||
private StreamEventResponse(@NonNull Parcel source) {
|
||||
super(responseType, source);
|
||||
super(RESPONSE_TYPE, source);
|
||||
mEventId = source.readInt();
|
||||
mNpt = source.readLong();
|
||||
int dataLength = source.readInt();
|
||||
@@ -64,22 +67,33 @@ public final class StreamEventResponse extends BroadcastInfoResponse implements
|
||||
source.readByteArray(mData);
|
||||
}
|
||||
|
||||
/** Returns the event ID */
|
||||
/**
|
||||
* Returns the event ID.
|
||||
*/
|
||||
public int getEventId() {
|
||||
return mEventId;
|
||||
}
|
||||
|
||||
/** Returns the NPT(Normal Play Time) value when the event occurred or will occur */
|
||||
/**
|
||||
* Returns the NPT(Normal Play Time) value when the event occurred or will occur.
|
||||
*/
|
||||
public long getNpt() {
|
||||
return mNpt;
|
||||
}
|
||||
|
||||
/** Returns the application specific data */
|
||||
@NonNull
|
||||
/**
|
||||
* Returns the application specific data.
|
||||
*/
|
||||
@Nullable
|
||||
public byte[] getData() {
|
||||
return mData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -24,11 +24,14 @@ import android.os.Parcelable;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A request for Table from broadcast signal.
|
||||
*/
|
||||
public final class TableRequest extends BroadcastInfoRequest implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int requestType =
|
||||
private static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_TABLE;
|
||||
|
||||
/** @hide */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({TABLE_NAME_PAT, TABLE_NAME_PMT})
|
||||
public @interface TableName {}
|
||||
@@ -54,37 +57,51 @@ public final class TableRequest extends BroadcastInfoRequest implements Parcelab
|
||||
private final @TableName int mTableName;
|
||||
private final int mVersion;
|
||||
|
||||
public static TableRequest createFromParcelBody(Parcel in) {
|
||||
static TableRequest createFromParcelBody(Parcel in) {
|
||||
return new TableRequest(in);
|
||||
}
|
||||
|
||||
public TableRequest(int requestId, @RequestOption int option, int tableId,
|
||||
@TableName int tableName, int version) {
|
||||
super(requestType, requestId, option);
|
||||
super(REQUEST_TYPE, requestId, option);
|
||||
mTableId = tableId;
|
||||
mTableName = tableName;
|
||||
mVersion = version;
|
||||
}
|
||||
|
||||
protected TableRequest(Parcel source) {
|
||||
super(requestType, source);
|
||||
TableRequest(Parcel source) {
|
||||
super(REQUEST_TYPE, source);
|
||||
mTableId = source.readInt();
|
||||
mTableName = source.readInt();
|
||||
mVersion = source.readInt();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ID of requested table.
|
||||
*/
|
||||
public int getTableId() {
|
||||
return mTableId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of requested table.
|
||||
*/
|
||||
public @TableName int getTableName() {
|
||||
return mTableName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the version number of requested table.
|
||||
*/
|
||||
public int getVersion() {
|
||||
return mVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -17,13 +17,16 @@
|
||||
package android.media.tv;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A response for Table from broadcast signal.
|
||||
*/
|
||||
public final class TableResponse extends BroadcastInfoResponse implements Parcelable {
|
||||
public static final @TvInputManager.BroadcastInfoType int responseType =
|
||||
private static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_TABLE;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<TableResponse> CREATOR =
|
||||
@@ -44,38 +47,53 @@ public final class TableResponse extends BroadcastInfoResponse implements Parcel
|
||||
private final int mVersion;
|
||||
private final int mSize;
|
||||
|
||||
public static TableResponse createFromParcelBody(Parcel in) {
|
||||
static TableResponse createFromParcelBody(Parcel in) {
|
||||
return new TableResponse(in);
|
||||
}
|
||||
|
||||
public TableResponse(int requestId, int sequence, @ResponseResult int responseResult,
|
||||
Uri tableUri, int version, int size) {
|
||||
super(responseType, requestId, sequence, responseResult);
|
||||
@Nullable Uri tableUri, int version, int size) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
mTableUri = tableUri;
|
||||
mVersion = version;
|
||||
mSize = size;
|
||||
}
|
||||
|
||||
protected TableResponse(Parcel source) {
|
||||
super(responseType, source);
|
||||
TableResponse(Parcel source) {
|
||||
super(RESPONSE_TYPE, source);
|
||||
String uriString = source.readString();
|
||||
mTableUri = uriString == null ? null : Uri.parse(uriString);
|
||||
mVersion = source.readInt();
|
||||
mSize = source.readInt();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URI in TvProvider database.
|
||||
*/
|
||||
@Nullable
|
||||
public Uri getTableUri() {
|
||||
return mTableUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Version number of table.
|
||||
*/
|
||||
public int getVersion() {
|
||||
return mVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Size number of table.
|
||||
*/
|
||||
public int getSize() {
|
||||
return mSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
||||
@@ -20,7 +20,9 @@ import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A request for Timeline from broadcast signal.
|
||||
*/
|
||||
public final class TimelineRequest extends BroadcastInfoRequest implements Parcelable {
|
||||
private static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_TIMELINE;
|
||||
@@ -39,24 +41,27 @@ public final class TimelineRequest extends BroadcastInfoRequest implements Parce
|
||||
}
|
||||
};
|
||||
|
||||
private final int mIntervalMs;
|
||||
private final int mIntervalMillis;
|
||||
|
||||
static TimelineRequest createFromParcelBody(Parcel in) {
|
||||
return new TimelineRequest(in);
|
||||
}
|
||||
|
||||
public TimelineRequest(int requestId, @RequestOption int option, int intervalMs) {
|
||||
public TimelineRequest(int requestId, @RequestOption int option, int intervalMillis) {
|
||||
super(REQUEST_TYPE, requestId, option);
|
||||
mIntervalMs = intervalMs;
|
||||
mIntervalMillis = intervalMillis;
|
||||
}
|
||||
|
||||
protected TimelineRequest(Parcel source) {
|
||||
TimelineRequest(Parcel source) {
|
||||
super(REQUEST_TYPE, source);
|
||||
mIntervalMs = source.readInt();
|
||||
mIntervalMillis = source.readInt();
|
||||
}
|
||||
|
||||
public int getIntervalMs() {
|
||||
return mIntervalMs;
|
||||
/**
|
||||
* Gets the interval of TIS sending response to TIAS in millisecond.
|
||||
*/
|
||||
public int getIntervalMillis() {
|
||||
return mIntervalMillis;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,6 +72,6 @@ public final class TimelineRequest extends BroadcastInfoRequest implements Parce
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
dest.writeInt(mIntervalMs);
|
||||
dest.writeInt(mIntervalMillis);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,13 @@
|
||||
package android.media.tv;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* A response for Timeline from broadcast signal.
|
||||
*/
|
||||
public final class TimelineResponse extends BroadcastInfoResponse implements Parcelable {
|
||||
private static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_TIMELINE;
|
||||
@@ -50,7 +53,7 @@ public final class TimelineResponse extends BroadcastInfoResponse implements Par
|
||||
}
|
||||
|
||||
public TimelineResponse(int requestId, int sequence,
|
||||
@ResponseResult int responseResult, String selector, int unitsPerTick,
|
||||
@ResponseResult int responseResult, @Nullable String selector, int unitsPerTick,
|
||||
int unitsPerSecond, long wallClock, long ticks) {
|
||||
super(RESPONSE_TYPE, requestId, sequence, responseResult);
|
||||
mSelector = selector;
|
||||
@@ -60,7 +63,7 @@ public final class TimelineResponse extends BroadcastInfoResponse implements Par
|
||||
mTicks = ticks;
|
||||
}
|
||||
|
||||
protected TimelineResponse(Parcel source) {
|
||||
TimelineResponse(Parcel source) {
|
||||
super(RESPONSE_TYPE, source);
|
||||
mSelector = source.readString();
|
||||
mUnitsPerTick = source.readInt();
|
||||
@@ -69,22 +72,43 @@ public final class TimelineResponse extends BroadcastInfoResponse implements Par
|
||||
mTicks = source.readLong();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Timeline Selector of the response.
|
||||
* The Timeline Selector is a URI that specifies the source of a Timeline
|
||||
* by indicating its type and information needed to locate the signalling
|
||||
* that conveys Time Values on it.
|
||||
*/
|
||||
@Nullable
|
||||
public String getSelector() {
|
||||
return mSelector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the UnitsPerTick of the response.
|
||||
*/
|
||||
public int getUnitsPerTick() {
|
||||
return mUnitsPerTick;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the UnitsPerSecond of the response.
|
||||
*/
|
||||
public int getUnitsPerSecond() {
|
||||
return mUnitsPerSecond;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the System time (UTC) of the response.
|
||||
*/
|
||||
public long getWallClock() {
|
||||
return mWallClock;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Ticks of the response.
|
||||
* A Time Value is a measure of a moment in time for a particular Timeline.
|
||||
* Time Values are represented by an integer number of ticks (positive or negative).
|
||||
*/
|
||||
public long getTicks() {
|
||||
return mTicks;
|
||||
}
|
||||
|
||||
@@ -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 =
|
||||
private static final @TvInputManager.BroadcastInfoType int REQUEST_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_TS;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<TsRequest> CREATOR =
|
||||
@@ -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);
|
||||
|
||||
@@ -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 =
|
||||
private static final @TvInputManager.BroadcastInfoType int RESPONSE_TYPE =
|
||||
TvInputManager.BROADCAST_INFO_TYPE_TS;
|
||||
|
||||
public static final @NonNull Parcelable.Creator<TsResponse> CREATOR =
|
||||
@@ -41,25 +44,36 @@ public final class TsResponse extends BroadcastInfoResponse implements Parcelabl
|
||||
|
||||
private final String mSharedFilterToken;
|
||||
|
||||
public static TsResponse createFromParcelBody(Parcel in) {
|
||||
static 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);
|
||||
@Nullable 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);
|
||||
|
||||
@@ -369,21 +369,13 @@ public final class TvInputManager {
|
||||
BROADCAST_INFO_TYPE_COMMAND, BROADCAST_INFO_TYPE_TIMELINE})
|
||||
public @interface BroadcastInfoType {}
|
||||
|
||||
/** @hide */
|
||||
public static final int BROADCAST_INFO_TYPE_TS = 1;
|
||||
/** @hide */
|
||||
public static final int BROADCAST_INFO_TYPE_TABLE = 2;
|
||||
/** @hide */
|
||||
public static final int BROADCAST_INFO_TYPE_SECTION = 3;
|
||||
/** @hide */
|
||||
public static final int BROADCAST_INFO_TYPE_PES = 4;
|
||||
/** @hide */
|
||||
public static final int BROADCAST_INFO_STREAM_EVENT = 5;
|
||||
/** @hide */
|
||||
public static final int BROADCAST_INFO_TYPE_DSMCC = 6;
|
||||
/** @hide */
|
||||
public static final int BROADCAST_INFO_TYPE_COMMAND = 7;
|
||||
/** @hide */
|
||||
public static final int BROADCAST_INFO_TYPE_TIMELINE = 8;
|
||||
|
||||
/** @hide */
|
||||
|
||||
@@ -106,9 +106,9 @@ public abstract class TvInputService extends Service {
|
||||
* @hide
|
||||
*/
|
||||
@IntDef(prefix = "PRIORITY_HINT_USE_CASE_TYPE_",
|
||||
value = {PRIORITY_HINT_USE_CASE_TYPE_BACKGROUND, PRIORITY_HINT_USE_CASE_TYPE_SCAN,
|
||||
PRIORITY_HINT_USE_CASE_TYPE_PLAYBACK, PRIORITY_HINT_USE_CASE_TYPE_LIVE,
|
||||
PRIORITY_HINT_USE_CASE_TYPE_RECORD})
|
||||
value = {PRIORITY_HINT_USE_CASE_TYPE_BACKGROUND, PRIORITY_HINT_USE_CASE_TYPE_SCAN,
|
||||
PRIORITY_HINT_USE_CASE_TYPE_PLAYBACK, PRIORITY_HINT_USE_CASE_TYPE_LIVE,
|
||||
PRIORITY_HINT_USE_CASE_TYPE_RECORD})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface PriorityHintUseCaseType {}
|
||||
|
||||
@@ -872,7 +872,6 @@ public abstract class TvInputService extends Service {
|
||||
* Notifies response for broadcast info.
|
||||
*
|
||||
* @param response broadcast info response.
|
||||
* @hide
|
||||
*/
|
||||
public void notifyBroadcastInfoResponse(@NonNull final BroadcastInfoResponse response) {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
@@ -1111,13 +1110,12 @@ public abstract class TvInputService extends Service {
|
||||
* called when broadcast info is requested.
|
||||
*
|
||||
* @param request broadcast info request
|
||||
* @hide
|
||||
*/
|
||||
public void onRequestBroadcastInfo(@NonNull BroadcastInfoRequest request) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* called when broadcast info is removed.
|
||||
*/
|
||||
public void onRemoveBroadcastInfo(int requestId) {
|
||||
}
|
||||
@@ -2291,43 +2289,43 @@ public abstract class TvInputService extends Service {
|
||||
|
||||
private final TvInputManager.SessionCallback mHardwareSessionCallback =
|
||||
new TvInputManager.SessionCallback() {
|
||||
@Override
|
||||
public void onSessionCreated(TvInputManager.Session session) {
|
||||
mHardwareSession = session;
|
||||
SomeArgs args = SomeArgs.obtain();
|
||||
if (session != null) {
|
||||
args.arg1 = HardwareSession.this;
|
||||
args.arg2 = mProxySession;
|
||||
args.arg3 = mProxySessionCallback;
|
||||
args.arg4 = session.getToken();
|
||||
session.tune(TvContract.buildChannelUriForPassthroughInput(
|
||||
getHardwareInputId()));
|
||||
} else {
|
||||
args.arg1 = null;
|
||||
args.arg2 = null;
|
||||
args.arg3 = mProxySessionCallback;
|
||||
args.arg4 = null;
|
||||
onRelease();
|
||||
}
|
||||
mServiceHandler.obtainMessage(ServiceHandler.DO_NOTIFY_SESSION_CREATED, args)
|
||||
.sendToTarget();
|
||||
}
|
||||
@Override
|
||||
public void onSessionCreated(TvInputManager.Session session) {
|
||||
mHardwareSession = session;
|
||||
SomeArgs args = SomeArgs.obtain();
|
||||
if (session != null) {
|
||||
args.arg1 = HardwareSession.this;
|
||||
args.arg2 = mProxySession;
|
||||
args.arg3 = mProxySessionCallback;
|
||||
args.arg4 = session.getToken();
|
||||
session.tune(TvContract.buildChannelUriForPassthroughInput(
|
||||
getHardwareInputId()));
|
||||
} else {
|
||||
args.arg1 = null;
|
||||
args.arg2 = null;
|
||||
args.arg3 = mProxySessionCallback;
|
||||
args.arg4 = null;
|
||||
onRelease();
|
||||
}
|
||||
mServiceHandler.obtainMessage(ServiceHandler.DO_NOTIFY_SESSION_CREATED,
|
||||
args).sendToTarget();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVideoAvailable(final TvInputManager.Session session) {
|
||||
if (mHardwareSession == session) {
|
||||
onHardwareVideoAvailable();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onVideoAvailable(final TvInputManager.Session session) {
|
||||
if (mHardwareSession == session) {
|
||||
onHardwareVideoAvailable();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVideoUnavailable(final TvInputManager.Session session,
|
||||
final int reason) {
|
||||
if (mHardwareSession == session) {
|
||||
onHardwareVideoUnavailable(reason);
|
||||
}
|
||||
}
|
||||
};
|
||||
@Override
|
||||
public void onVideoUnavailable(final TvInputManager.Session session,
|
||||
final int reason) {
|
||||
if (mHardwareSession == session) {
|
||||
onHardwareVideoUnavailable(reason);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* This method will not be called in {@link HardwareSession}. Framework will
|
||||
|
||||
@@ -556,7 +556,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
|
||||
/**
|
||||
* Called when a broadcast info response is received.
|
||||
* @hide
|
||||
*/
|
||||
public void onBroadcastInfoResponse(@NonNull BroadcastInfoResponse response) {
|
||||
}
|
||||
@@ -659,7 +658,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
/**
|
||||
* Requests broadcast related information from the related TV input.
|
||||
* @param request the request for broadcast info
|
||||
* @hide
|
||||
*/
|
||||
public void requestBroadcastInfo(@NonNull final BroadcastInfoRequest request) {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
@@ -684,7 +682,6 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
/**
|
||||
* Remove broadcast information request from the related TV input.
|
||||
* @param requestId the ID of the request
|
||||
* @hide
|
||||
*/
|
||||
public void removeBroadcastInfo(final int requestId) {
|
||||
executeOrPostRunnableOnMainThread(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user