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
diff --git a/api/current.txt b/api/current.txt
index a0dccd5..b8a8dfe 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -17784,6 +17784,7 @@
     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 7e3e051..34a86cf 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -19123,6 +19123,7 @@
     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 91b1a49..975645d 100644
--- a/media/java/android/media/tv/TvContract.java
+++ b/media/java/android/media/tv/TvContract.java
@@ -332,11 +332,11 @@
      */
     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.
          *
-         * <p>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.
+         * <p>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.
          *
          * <p>Type: TEXT
          */
@@ -680,12 +680,13 @@
         /**
          * The flag indicating whether this TV channel is searchable or not.
          *
-         * <p>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.
+         * <p>The columns of searchable channels can be read by other applications that have proper
+         * permission. Care must be taken not to open sensitive data.
+         *
+         * <p>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.
          *
          * <p>Type: INTEGER (boolean)
          */
@@ -1011,6 +1012,21 @@
         public static final String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
 
         /**
+         * The flag indicating whether this TV program is searchable or not.
+         *
+         * <p>The columns of searchable programs can be read by other applications that have proper
+         * permission. Care must be taken not to open sensitive data.
+         *
+         * <p>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.
+         *
+         * <p>Type: INTEGER (boolean)
+         */
+        public static final String COLUMN_SEARCHABLE = "searchable";
+
+        /**
          * Internal data used by individual TV input services.
          *
          * <p>This is internal to the provider that inserted it, and should not be decoded by other