Update TvMessage key constants

Bug: 272375356
Test: mmm
Change-Id: I47443c1799728702a4b49ddfb73d76148614b805
This commit is contained in:
David Zhao
2023-03-16 14:40:26 -07:00
parent 2ecdb0e0b3
commit fa97faa582
6 changed files with 51 additions and 10 deletions

View File

@@ -27348,9 +27348,13 @@ package android.media.tv {
field public static final int TIME_SHIFT_STATUS_UNAVAILABLE = 2; // 0x2
field public static final int TIME_SHIFT_STATUS_UNKNOWN = 0; // 0x0
field public static final int TIME_SHIFT_STATUS_UNSUPPORTED = 1; // 0x1
field public static final long TV_MESSAGE_GROUP_ID_NONE = -1L; // 0xffffffffffffffffL
field public static final String TV_MESSAGE_KEY_GROUP_ID = "android.media.tv.TvInputManager.group_id";
field public static final String TV_MESSAGE_KEY_RAW_DATA = "android.media.tv.TvInputManager.raw_data";
field public static final String TV_MESSAGE_KEY_STREAM_ID = "android.media.tv.TvInputManager.stream_id";
field public static final String TV_MESSAGE_KEY_SUBTYPE = "android.media.tv.TvInputManager.subtype";
field public static final String TV_MESSAGE_SUBTYPE_CC_608E = "CTA 608-E";
field public static final String TV_MESSAGE_SUBTYPE_WATERMARKING_A335 = "ATSC A/335";
field public static final int TV_MESSAGE_TYPE_CLOSED_CAPTION = 2; // 0x2
field public static final int TV_MESSAGE_TYPE_OTHER = 1000; // 0x3e8
field public static final int TV_MESSAGE_TYPE_WATERMARK = 1; // 0x1

View File

@@ -155,21 +155,52 @@ public final class TvInputManager {
public static final String TV_MESSAGE_KEY_STREAM_ID =
"android.media.tv.TvInputManager.stream_id";
/**
* This value for {@link #TV_MESSAGE_KEY_GROUP_ID} denotes that the message doesn't
* belong to any group.
*/
public static final long TV_MESSAGE_GROUP_ID_NONE = -1;
/**
* This constant is used as a {@link Bundle} key for TV messages. This is used to
* optionally identify messages that belong together, such as headers and bodies
* of the same event. For messages that do not have a group, this value
* should be {@link #TV_MESSAGE_GROUP_ID_NONE}.
*
* <p> As -1 is a reserved value, -1 should not be used as a valid groupId.
*
* <p> Type: long
*/
public static final String TV_MESSAGE_KEY_GROUP_ID =
"android.media.tv.TvInputManager.group_id";
/**
* This is a subtype for TV messages that can be potentially found as a value
* at {@link #TV_MESSAGE_KEY_SUBTYPE}. It identifies the subtype of the message
* as the watermarking format ATSC A/335.
*/
public static final String TV_MESSAGE_SUBTYPE_WATERMARKING_A335 = "ATSC A/335";
/**
* This is a subtype for TV messages that can be potentially found as a value
* at {@link #TV_MESSAGE_KEY_SUBTYPE}. It identifies the subtype of the message
* as the CC format CTA 608-E.
*/
public static final String TV_MESSAGE_SUBTYPE_CC_608E = "CTA 608-E";
/**
* This constant is used as a {@link Bundle} key for TV messages. The value of the key
* identifies the subtype of the data, such as the format of the CC data. The format
* found at this key can then be used to identify how to parse the data at
* {@link #TV_MESSAGE_KEY_RAW_DATA}.
*
* To parse the raw data bsed on the subtype, please refer to the official documentation of the
* concerning subtype. For example, for the subtype "ATSC A/335" for watermarking, the
* document for A/335 from the ATSC standard details how this data is formatted.
*
* Some other examples of common formats include:
* <ul>
* <li>Watermarking - ATSC A/336</li>
* <li>Closed Captioning - CTA 608-E</li>
* </ul>
* <p> To parse the raw data based on the subtype, please refer to the official
* documentation of the concerning subtype. For example, for the subtype
* {@link #TV_MESSAGE_SUBTYPE_WATERMARKING_A335}, the document for A/335 from the ATSC
* standard details how this data is formatted. Similarly, the subtype
* {@link #TV_MESSAGE_SUBTYPE_CC_608E} is documented in the ANSI/CTA standard for
* 608-E. These subtypes are examples of common formats for their respective uses
* and other subtypes may exist.
*
* <p> Type: String
*/
@@ -178,7 +209,7 @@ public final class TvInputManager {
/**
* This constant is used as a {@link Bundle} key for TV messages. The value of the key
* stores the raw data contained in this TV Message. The format of this data is determined
* stores the raw data contained in this TV message. The format of this data is determined
* by the format defined by the subtype, found using the key at
* {@link #TV_MESSAGE_KEY_SUBTYPE}. See {@link #TV_MESSAGE_KEY_SUBTYPE} for more
* information on how to parse this data.
@@ -839,6 +870,7 @@ public final class TvInputManager {
* @param type The type of message received, such as {@link #TV_MESSAGE_TYPE_WATERMARK}
* @param data The raw data of the message. The bundle keys are:
* {@link TvInputManager#TV_MESSAGE_KEY_STREAM_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_GROUP_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE},
* {@link TvInputManager#TV_MESSAGE_KEY_RAW_DATA}.
* See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on

View File

@@ -1032,6 +1032,7 @@ public abstract class TvInputService extends Service {
* {@link TvInputManager#TV_MESSAGE_TYPE_WATERMARK}
* @param data The raw data of the message. The bundle keys are:
* {@link TvInputManager#TV_MESSAGE_KEY_STREAM_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_GROUP_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE},
* {@link TvInputManager#TV_MESSAGE_KEY_RAW_DATA}.
* See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on
@@ -1507,6 +1508,7 @@ public abstract class TvInputService extends Service {
* {@link TvInputManager#TV_MESSAGE_TYPE_WATERMARK}
* @param data The raw data of the message. The bundle keys are:
* {@link TvInputManager#TV_MESSAGE_KEY_STREAM_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_GROUP_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE},
* {@link TvInputManager#TV_MESSAGE_KEY_RAW_DATA}.
* See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on

View File

@@ -1256,6 +1256,7 @@ public class TvView extends ViewGroup {
* {@link TvInputManager#TV_MESSAGE_TYPE_WATERMARK}
* @param data The raw data of the message. The bundle keys are:
* {@link TvInputManager#TV_MESSAGE_KEY_STREAM_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_GROUP_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE},
* {@link TvInputManager#TV_MESSAGE_KEY_RAW_DATA}.
* See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on

View File

@@ -921,6 +921,7 @@ public abstract class TvInteractiveAppService extends Service {
* {@link TvInputManager#TV_MESSAGE_TYPE_WATERMARK}
* @param data The raw data of the message. The bundle keys are:
* {@link TvInputManager#TV_MESSAGE_KEY_STREAM_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_GROUP_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE},
* {@link TvInputManager#TV_MESSAGE_KEY_RAW_DATA}.
* See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on

View File

@@ -946,6 +946,7 @@ public class TvInteractiveAppView extends ViewGroup {
* {@link TvInputManager#TV_MESSAGE_TYPE_WATERMARK}
* @param data The raw data of the message. The bundle keys are:
* {@link TvInputManager#TV_MESSAGE_KEY_STREAM_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_GROUP_ID},
* {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE},
* {@link TvInputManager#TV_MESSAGE_KEY_RAW_DATA}.
* See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on