From 546ef567b82e8be301b4204649b161dc095d0f60 Mon Sep 17 00:00:00 2001 From: Jae Seo Date: Fri, 19 Jun 2015 17:34:37 -0700 Subject: [PATCH] TIF: Add COLUMN_SEARCHABLE to TvContract.Programs This allows applications to specify not only channels but also programs searchable or not enabling finer grained access control. Bug: 18910284 Change-Id: Id476c37ae8521301c50a4fb2007b41661e74fe89 --- api/current.txt | 1 + api/system-current.txt | 1 + media/java/android/media/tv/TvContract.java | 36 +++++++++++++++------ 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/api/current.txt b/api/current.txt index a0dccd5963a11..b8a8dfe3f9b79 100644 --- a/api/current.txt +++ b/api/current.txt @@ -17784,6 +17784,7 @@ package android.media.tv { field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4"; field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description"; field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri"; + field public static final java.lang.String COLUMN_SEARCHABLE = "searchable"; field public static final java.lang.String COLUMN_SEASON_NUMBER = "season_number"; field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description"; field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis"; diff --git a/api/system-current.txt b/api/system-current.txt index 7e3e051e6a4af..34a86cf1a2c15 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -19123,6 +19123,7 @@ package android.media.tv { field public static final java.lang.String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4"; field public static final java.lang.String COLUMN_LONG_DESCRIPTION = "long_description"; field public static final java.lang.String COLUMN_POSTER_ART_URI = "poster_art_uri"; + field public static final java.lang.String COLUMN_SEARCHABLE = "searchable"; field public static final java.lang.String COLUMN_SEASON_NUMBER = "season_number"; field public static final java.lang.String COLUMN_SHORT_DESCRIPTION = "short_description"; field public static final java.lang.String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis"; diff --git a/media/java/android/media/tv/TvContract.java b/media/java/android/media/tv/TvContract.java index 91b1a49d9a7eb..975645d1bffea 100644 --- a/media/java/android/media/tv/TvContract.java +++ b/media/java/android/media/tv/TvContract.java @@ -332,11 +332,11 @@ public final class TvContract { */ public interface BaseTvColumns extends BaseColumns { /** - * The name of the package that owns a row in each table. + * The name of the package that owns the current row. * - *

The TV provider fills it in with the name of the package that provides the initial data - * of that row. If the package is later uninstalled, the rows it owns are automatically - * removed from the tables. + *

The TV provider fills in this column with the name of the package that provides the + * initial data of the row. If the package is later uninstalled, the rows it owns are + * automatically removed from the tables. * *

Type: TEXT */ @@ -680,12 +680,13 @@ public final class TvContract { /** * 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. Channels marked - * with "not searchable" cannot be used by other services except for the system service that - * shows the TV content. 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. + *

The columns of searchable channels can be read by other applications that have proper + * permission. Care must be taken not to open sensitive data. + * + *

A value of 1 indicates that the channel is searchable and its columns can be read by + * other applications, a value of 0 indicates that the channel is hidden and its columns can + * be read only by the package that owns the channel and the system. If not specified, this + * value is set to 1 (searchable) by default. * *

Type: INTEGER (boolean) */ @@ -1010,6 +1011,21 @@ public final class TvContract { */ public static final String COLUMN_THUMBNAIL_URI = "thumbnail_uri"; + /** + * The flag indicating whether this TV program is searchable or not. + * + *

The columns of searchable programs can be read by other applications that have proper + * permission. Care must be taken not to open sensitive data. + * + *

A value of 1 indicates that the program is searchable and its columns can be read by + * other applications, a value of 0 indicates that the program is hidden and its columns can + * be read only by the package that owns the program and the system. If not specified, this + * value is set to 1 (searchable) by default. + * + *

Type: INTEGER (boolean) + */ + public static final String COLUMN_SEARCHABLE = "searchable"; + /** * Internal data used by individual TV input services. *