diff options
-rw-r--r-- | core/api/current.txt | 4 | ||||
-rw-r--r-- | media/java/android/media/tv/TvInputManager.java | 52 | ||||
-rw-r--r-- | media/java/android/media/tv/TvInputService.java | 2 | ||||
-rw-r--r-- | media/java/android/media/tv/TvView.java | 1 | ||||
-rwxr-xr-x | media/java/android/media/tv/interactive/TvInteractiveAppService.java | 1 | ||||
-rwxr-xr-x | media/java/android/media/tv/interactive/TvInteractiveAppView.java | 1 |
6 files changed, 51 insertions, 10 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 771d56cd1987..2acbc35a387c 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -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 diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java index ef2b5a5b6e50..7364daa53f89 100644 --- a/media/java/android/media/tv/TvInputManager.java +++ b/media/java/android/media/tv/TvInputManager.java @@ -156,20 +156,51 @@ public final class TvInputManager { "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 diff --git a/media/java/android/media/tv/TvInputService.java b/media/java/android/media/tv/TvInputService.java index 0d283fa87c19..85b02ad54718 100644 --- a/media/java/android/media/tv/TvInputService.java +++ b/media/java/android/media/tv/TvInputService.java @@ -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 diff --git a/media/java/android/media/tv/TvView.java b/media/java/android/media/tv/TvView.java index 8a886832e88e..c91f62db95c4 100644 --- a/media/java/android/media/tv/TvView.java +++ b/media/java/android/media/tv/TvView.java @@ -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 diff --git a/media/java/android/media/tv/interactive/TvInteractiveAppService.java b/media/java/android/media/tv/interactive/TvInteractiveAppService.java index 69ff9c63b32b..06dfe4fffefe 100755 --- a/media/java/android/media/tv/interactive/TvInteractiveAppService.java +++ b/media/java/android/media/tv/interactive/TvInteractiveAppService.java @@ -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 diff --git a/media/java/android/media/tv/interactive/TvInteractiveAppView.java b/media/java/android/media/tv/interactive/TvInteractiveAppView.java index 80a14354ef7a..cbaf5e482faa 100755 --- a/media/java/android/media/tv/interactive/TvInteractiveAppView.java +++ b/media/java/android/media/tv/interactive/TvInteractiveAppView.java @@ -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 |