From 7752244e47543ccdc8a45c05c769d6cac32b762b Mon Sep 17 00:00:00 2001 From: Jae Seo Date: Wed, 14 May 2014 13:29:06 -0700 Subject: [PATCH] DO NOT MERGE. Add more columns to TV metadata to enable newly requested use cases Added the following columns to the Channels table: searchable - Used to hide certain channels from search. locked - Used to prevent unauthorized users from watching certain channels by requiring passcode. Added the following columns to the Programs table: genre - Used to describe the categorical genre. audio_language - Used to list up available audio languages. Bug: 14833588, Bug: 14123945, Bug: 14069779 Change-Id: Id01483f56ecf3b665e3d4dbcea1a4800ff7f031d (cherry picked from commit 3532899452d62b6f2cd9250cb48ec204862fb3b2) --- api/current.txt | 4 ++ core/java/android/provider/TvContract.java | 70 +++++++++++++++++++++- 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/api/current.txt b/api/current.txt index c38a82fc0698c..b1e9b691a9261 100644 --- a/api/current.txt +++ b/api/current.txt @@ -25026,7 +25026,9 @@ package android.provider { field public static final java.lang.String COLUMN_DESCRIPTION = "description"; field public static final java.lang.String COLUMN_DISPLAY_NAME = "display_name"; field public static final java.lang.String COLUMN_DISPLAY_NUMBER = "display_number"; + field public static final java.lang.String COLUMN_LOCKED = "locked"; field public static final java.lang.String COLUMN_ORIGINAL_NETWORK_ID = "original_network_id"; + field public static final java.lang.String COLUMN_SEARCHABLE = "searchable"; field public static final java.lang.String COLUMN_SERVICE_ID = "service_id"; field public static final java.lang.String COLUMN_SERVICE_NAME = "service_name"; field public static final java.lang.String COLUMN_SERVICE_TYPE = "service_type"; @@ -25064,10 +25066,12 @@ package android.provider { } public static final class TvContract.Programs implements android.provider.TvContract.BaseTvColumns { + field public static final java.lang.String COLUMN_AUDIO_LANGUAGE = "audio_language"; field public static final java.lang.String COLUMN_CHANNEL_ID = "channel_id"; field public static final java.lang.String COLUMN_DATA = "data"; field public static final java.lang.String COLUMN_DESCRIPTION = "description"; field public static final java.lang.String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis"; + field public static final java.lang.String COLUMN_GENRE = "genre"; field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description"; field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis"; field public static final java.lang.String COLUMN_TITLE = "title"; diff --git a/core/java/android/provider/TvContract.java b/core/java/android/provider/TvContract.java index 5ffffb535b9ab..e4f93a8ba44ca 100644 --- a/core/java/android/provider/TvContract.java +++ b/core/java/android/provider/TvContract.java @@ -462,13 +462,43 @@ public final class TvContract { *

* A value of 1 indicates the channel is included in the channel list that applications use * to browse channels, a value of 0 indicates the channel is not included in the list. If - * not specified, this value is set to 1 by default. + * not specified, this value is set to 1 (browsable) by default. *

* Type: INTEGER (boolean) *

*/ public static final String COLUMN_BROWSABLE = "browsable"; + /** + * The flag indicating whether this TV channel is searchable or not. + *

+ * In some regions, it is not allowed to surface search results for a given channel without + * broadcaster's consent. This is used to impose such restriction. A value of 1 indicates + * the channel is searchable and can be included in search results, a value of 0 indicates + * the channel and its TV programs are hidden from search. If not specified, this value is + * set to 1 (searchable) by default. + *

+ *

+ * Type: INTEGER (boolean) + *

+ */ + public static final String COLUMN_SEARCHABLE = "searchable"; + + /** + * The flag indicating whether this TV channel is locked or not. + *

+ * This is primarily used for alternative parental control to prevent unauthorized users + * from watching the current channel regardless of the content rating. A value of 1 + * indicates the channel is locked and the user is required to enter passcode to unlock it + * in order to watch the current program from the channel, a value of 0 indicates the + * channel is not locked thus the user is not prompted to enter passcode If not specified, + * this value is set to 0 (not locked) by default. + *

+ * Type: INTEGER (boolean) + *

+ */ + public static final String COLUMN_LOCKED = "locked"; + /** * Generic data used by individual TV input services. *

@@ -543,6 +573,33 @@ public final class TvContract { */ public static final String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis"; + /** + * The comma-separated genre string of this TV program. + *

+ * Use the same language appeared in the underlying broadcast standard, if applicable. (For + * example, one can refer to the genre strings used in Genre Descriptor of ATSC A/65 or + * Content Descriptor of ETSI EN 300 468, if appropriate.) Otherwise, use one of the + * following genres: + *

+ *

+ * Type: TEXT + *

+ */ + public static final String COLUMN_GENRE = "genre"; + /** * The description of this TV program that is displayed to the user by default. *

@@ -565,6 +622,17 @@ public final class TvContract { */ public static final String COLUMN_LONG_DESCRIPTION = "long_description"; + /** + * The comma-separated audio languages of this TV program. + *

+ * This is used to describe available audio languages included in the program. Use + * 3-character language code as specified by ISO 639-2. + *

+ * Type: TEXT + *

+ */ + public static final String COLUMN_AUDIO_LANGUAGE = "audio_language"; + /** * Generic data used by TV input services. *