diff --git a/api/current.txt b/api/current.txt index eb1f46b97dae9..ffcadfccc6b86 100644 --- a/api/current.txt +++ b/api/current.txt @@ -24006,25 +24006,32 @@ package android.provider { } public static abstract interface TvContract.BaseTvColumns implements android.provider.BaseColumns { - field public static final java.lang.String PACKAGE_NAME = "package_name"; + field public static final java.lang.String COLUMN_PACKAGE_NAME = "package_name"; } public static final class TvContract.Channels implements android.provider.TvContract.BaseTvColumns { - field public static final java.lang.String BROWSABLE = "browsable"; + field public static final java.lang.String COLUMN_BROWSABLE = "browsable"; + 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_DISPLAY_NAME = "display_name"; + field public static final java.lang.String COLUMN_DISPLAY_NUMBER = "display_number"; + field public static final java.lang.String COLUMN_ORIGINAL_NETWORK_ID = "original_network_id"; + 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"; + field public static final java.lang.String COLUMN_TRANSPORT_STREAM_ID = "transport_stream_id"; + field public static final java.lang.String COLUMN_TYPE = "type"; + field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number"; field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.com.android.tv.channels"; field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.com.android.tv.channels"; field public static final android.net.Uri CONTENT_URI; - field public static final java.lang.String DATA = "data"; - field public static final java.lang.String DESCRIPTION = "description"; - field public static final java.lang.String DISPLAY_NAME = "display_name"; - field public static final java.lang.String DISPLAY_NUMBER = "display_number"; - field public static final java.lang.String SERVICE_NAME = "service_name"; - field public static final java.lang.String TRANSPORT_STREAM_ID = "transport_stream_id"; - field public static final java.lang.String TYPE = "type"; + field public static final int SERVICE_TYPE_OTHER = 0; // 0x0 + field public static final int SERVICE_TYPE_RADIO = 2; // 0x2 + field public static final int SERVICE_TYPE_TV = 1; // 0x1 field public static final int TYPE_1SEG = 263168; // 0x40400 - field public static final int TYPE_ATSC = 196608; // 0x30000 - field public static final int TYPE_ATSC_2_0 = 196609; // 0x30001 - field public static final int TYPE_ATSC_M_H = 196864; // 0x30100 + field public static final int TYPE_ATSC_C = 197120; // 0x30200 + field public static final int TYPE_ATSC_M_H = 197120; // 0x30200 + field public static final int TYPE_ATSC_T = 196608; // 0x30000 field public static final int TYPE_CMMB = 327936; // 0x50100 field public static final int TYPE_DTMB = 327680; // 0x50000 field public static final int TYPE_DVB_C = 131584; // 0x20200 @@ -24043,21 +24050,20 @@ package android.provider { field public static final int TYPE_PASSTHROUGH = 65536; // 0x10000 field public static final int TYPE_S_DMB = 393472; // 0x60100 field public static final int TYPE_T_DMB = 393216; // 0x60000 - field public static final java.lang.String VERSION_NUMBER = "version_number"; } public static final class TvContract.Programs implements android.provider.TvContract.BaseTvColumns { - field public static final java.lang.String CHANNEL_ID = "channel_id"; + 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_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"; + field public static final java.lang.String COLUMN_VERSION_NUMBER = "version_number"; field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.com.android.tv.programs"; field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.com.android.tv.programs"; field public static final android.net.Uri CONTENT_URI; - field public static final java.lang.String DATA = "data"; - field public static final java.lang.String DESCRIPTION = "description"; - field public static final java.lang.String END_TIME_UTC_MILLIS = "end_time_utc_millis"; - field public static final java.lang.String LONG_DESCRIPTION = "long_description"; - field public static final java.lang.String START_TIME_UTC_MILLIS = "start_time_utc_millis"; - field public static final java.lang.String TITLE = "title"; - field public static final java.lang.String VERSION_NUMBER = "version_number"; } public class UserDictionary { diff --git a/core/java/android/provider/TvContract.java b/core/java/android/provider/TvContract.java index 62252be15fef3..5ffffb535b9ab 100644 --- a/core/java/android/provider/TvContract.java +++ b/core/java/android/provider/TvContract.java @@ -20,6 +20,7 @@ import android.content.ComponentName; import android.content.ContentResolver; import android.content.ContentUris; import android.net.Uri; +import android.tv.TvInputService; import java.util.List; @@ -139,9 +140,9 @@ public final class TvContract { * * @param channelUri The URI of the channel to return programs for. * @param startTime The start time used to filter programs. The returned programs should have - * {@link Programs#END_TIME_UTC_MILLIS} that is greater than this time. + * {@link Programs#COLUMN_END_TIME_UTC_MILLIS} that is greater than this time. * @param endTime The end time used to filter programs. The returned programs should have - * {@link Programs#START_TIME_UTC_MILLIS} that is less than this time. + * {@link Programs#COLUMN_START_TIME_UTC_MILLIS} that is less than this time. */ public static final Uri buildProgramsUriForChannel(Uri channelUri, long startTime, long endTime) { @@ -161,7 +162,7 @@ public final class TvContract { } /** - * Extracts the {@link Channels#PACKAGE_NAME} from a given URI. + * Extracts the {@link Channels#COLUMN_PACKAGE_NAME} from a given URI. * * @param channelsUri A URI constructed by {@link #buildChannelsUriForInput(ComponentName)} or * {@link #buildChannelsUriForInput(ComponentName, boolean)}. @@ -179,7 +180,7 @@ public final class TvContract { } /** - * Extracts the {@link Channels#SERVICE_NAME} from a given URI. + * Extracts the {@link Channels#COLUMN_SERVICE_NAME} from a given URI. * * @param channelsUri A URI constructed by {@link #buildChannelsUriForInput(ComponentName)} or * {@link #buildChannelsUriForInput(ComponentName, boolean)}. @@ -231,7 +232,7 @@ public final class TvContract { * Type: TEXT *
*/ - public static final String PACKAGE_NAME = "package_name"; + public static final String COLUMN_PACKAGE_NAME = "package_name"; } /** Column definitions for the TV channels table. */ @@ -279,14 +280,14 @@ public final class TvContract { /** The channel type for DVB-SH (satellite). */ public static final int TYPE_DVB_SH = 0x00020400; - /** The channel type for ATSC (terrestrial/cable). */ - public static final int TYPE_ATSC = 0x00030000; + /** The channel type for ATSC (terrestrial). */ + public static final int TYPE_ATSC_T = 0x00030000; - /** The channel type for ATSC 2.0. */ - public static final int TYPE_ATSC_2_0 = 0x00030001; + /** The channel type for ATSC (cable). */ + public static final int TYPE_ATSC_C = 0x00030200; /** The channel type for ATSC-M/H (mobile/handheld). */ - public static final int TYPE_ATSC_M_H = 0x00030100; + public static final int TYPE_ATSC_M_H = 0x00030200; /** The channel type for ISDB-T (terrestrial). */ public static final int TYPE_ISDB_T = 0x00040000; @@ -315,49 +316,124 @@ public final class TvContract { /** The channel type for S-DMB (satellite). */ public static final int TYPE_S_DMB = 0x00060100; + /** A generic service type. */ + public static final int SERVICE_TYPE_OTHER = 0x0; + + /** The service type for regular TV channels. */ + public static final int SERVICE_TYPE_TV = 0x1; + + /** The service type for radio channels. */ + public static final int SERVICE_TYPE_RADIO = 0x2; + /** - * The name of the TV input service that provides this TV channel. + * The name of the {@link TvInputService} subclass that provides this TV channel. This + * should be a fully qualified class name (such as, "com.example.project.TvInputService"). ** This is a required field. *
* Type: TEXT *
*/ - public static final String SERVICE_NAME = "service_name"; + public static final String COLUMN_SERVICE_NAME = "service_name"; /** * The predefined type of this TV channel. *- * This is used to indicate which broadcast standard (e.g. ATSC, DVB or ISDB) the current - * channel conforms to. + * This is primarily used to indicate which broadcast standard (e.g. ATSC, DVB or ISDB) the + * current channel conforms to, with an exception being {@link #TYPE_PASSTHROUGH}, which is + * a special channel type used only by pass-through inputs such as HDMI. The value should + * match to one of the followings: {@link #TYPE_OTHER}, {@link #TYPE_PASSTHROUGH}, + * {@link #TYPE_DVB_T}, {@link #TYPE_DVB_T2}, {@link #TYPE_DVB_S}, {@link #TYPE_DVB_S2}, + * {@link #TYPE_DVB_C}, {@link #TYPE_DVB_C2}, {@link #TYPE_DVB_H}, {@link #TYPE_DVB_SH}, + * {@link #TYPE_ATSC_T}, {@link #TYPE_ATSC_C}, {@link #TYPE_ATSC_M_H}, {@link #TYPE_ISDB_T}, + * {@link #TYPE_ISDB_TB}, {@link #TYPE_ISDB_S}, {@link #TYPE_ISDB_C} {@link #TYPE_1SEG}, + * {@link #TYPE_DTMB}, {@link #TYPE_CMMB}, {@link #TYPE_T_DMB}, {@link #TYPE_S_DMB} *
* This is a required field. *
* Type: INTEGER *
*/ - public static final String TYPE = "type"; + public static final String COLUMN_TYPE = "type"; /** - * The transport stream ID as appeared in various broadcast standards. + * The predefined service type of this TV channel. *- * This is not a required field but if provided, can significantly increase the accuracy of - * channel identification. + * This is primarily used to indicate whether the current channel is a regular TV channel or + * a radio-like channel. Use the same coding for {@code service_type} in the underlying + * broadcast standard if it is defined there (e.g. ATSC A/53, ETSI EN 300 468 and ARIB + * STD-B10). Otherwise use one of the followings: {@link #SERVICE_TYPE_OTHER}, + * {@link #SERVICE_TYPE_TV}, {@link #SERVICE_TYPE_RADIO} + *
+ * This is a required field. *
* Type: INTEGER *
*/ - public static final String TRANSPORT_STREAM_ID = "transport_stream_id"; + public static final String COLUMN_SERVICE_TYPE = "service_type"; + + /** + * The original network ID of this TV channel. + *+ * This is used to identify the originating delivery system, if applicable. Use the same + * coding for {@code origianal_network_id} in the underlying broadcast standard if it is + * defined there (e.g. ETSI EN 300 468/TR 101 211 and ARIB STD-B10). If channels cannot be + * globally identified by 2-tuple {{@link #COLUMN_TRANSPORT_STREAM_ID}, + * {@link #COLUMN_SERVICE_ID}}, one must carefully assign a value to this field to form a + * unique 3-tuple identification {{@link #COLUMN_ORIGINAL_NETWORK_ID}, + * {@link #COLUMN_TRANSPORT_STREAM_ID}, {@link #COLUMN_SERVICE_ID}} for its channels. + *
+ * This is a required field if the channel cannot be uniquely identified by a 2-tuple + * {{@link #COLUMN_TRANSPORT_STREAM_ID}, {@link #COLUMN_SERVICE_ID}}. + *
+ * Type: INTEGER + *
+ */ + public static final String COLUMN_ORIGINAL_NETWORK_ID = "original_network_id"; + + /** + * The transport stream ID of this channel. + *+ * This is used to identify the Transport Stream that contains the current channel from any + * other multiplex within a network, if applicable. Use the same coding for + * {@code transport_stream_id} defined in ISO/IEC 13818-1 if the channel is transmitted via + * the MPEG Transport Stream as is the case for many digital broadcast standards. + *
+ * This is a required field if the current channel is transmitted via the MPEG Transport + * Stream. + *
+ * Type: INTEGER + *
+ */ + public static final String COLUMN_TRANSPORT_STREAM_ID = "transport_stream_id"; + + /** + * The service ID of this channel. + *+ * This is used to identify the current service (roughly equivalent to channel) from any + * other service within the Transport Stream, if applicable. Use the same coding for + * {@code service_id} in the underlying broadcast standard if it is defined there (e.g. ETSI + * EN 300 468 and ARIB STD-B10) or {@code program_number} (which usually has the same value + * as {@code service_id}) in ISO/IEC 13818-1 if the channel is transmitted via the MPEG + * Transport Stream. + *
+ * This is a required field if the current channel is transmitted via the MPEG Transport + * Stream. + *
+ * Type: INTEGER + *
+ */ + public static final String COLUMN_SERVICE_ID = "service_id"; /** * The channel number that is displayed to the user. ** The format can vary depending on broadcast standard and product specification. *
- * Type: INTEGER + * Type: TEXT *
*/ - public static final String DISPLAY_NUMBER = "display_number"; + public static final String COLUMN_DISPLAY_NUMBER = "display_number"; /** * The channel name that is displayed to the user. @@ -369,7 +445,7 @@ public final class TvContract { * Type: TEXT * */ - public static final String DISPLAY_NAME = "display_name"; + public static final String COLUMN_DISPLAY_NAME = "display_name"; /** * The description of this TV channel. @@ -379,7 +455,7 @@ public final class TvContract { * Type: TEXT * */ - public static final String DESCRIPTION = "description"; + public static final String COLUMN_DESCRIPTION = "description"; /** * The flag indicating whether this TV channel is browsable or not. @@ -391,7 +467,7 @@ public final class TvContract { * Type: INTEGER (boolean) * */ - public static final String BROWSABLE = "browsable"; + public static final String COLUMN_BROWSABLE = "browsable"; /** * Generic data used by individual TV input services. @@ -399,7 +475,7 @@ public final class TvContract { * Type: BLOB * */ - public static final String DATA = "data"; + public static final String COLUMN_DATA = "data"; /** @@ -413,7 +489,7 @@ public final class TvContract { * Type: INTEGER * */ - public static final String VERSION_NUMBER = "version_number"; + public static final String COLUMN_VERSION_NUMBER = "version_number"; private Channels() {} } @@ -441,7 +517,7 @@ public final class TvContract { * Type: INTEGER (long) * */ - public static final String CHANNEL_ID = "channel_id"; + public static final String COLUMN_CHANNEL_ID = "channel_id"; /** * The title of this TV program. @@ -449,7 +525,7 @@ public final class TvContract { * Type: TEXT * **/ - public static final String TITLE = "title"; + public static final String COLUMN_TITLE = "title"; /** * The start time of this TV program, in milliseconds since the epoch. @@ -457,7 +533,7 @@ public final class TvContract { * Type: INTEGER (long) * */ - public static final String START_TIME_UTC_MILLIS = "start_time_utc_millis"; + public static final String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis"; /** * The end time of this TV program, in milliseconds since the epoch. @@ -465,7 +541,7 @@ public final class TvContract { * Type: INTEGER (long) * */ - public static final String END_TIME_UTC_MILLIS = "end_time_utc_millis"; + public static final String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis"; /** * The description of this TV program that is displayed to the user by default. @@ -475,19 +551,19 @@ public final class TvContract { * Type: TEXT * */ - public static final String DESCRIPTION = "description"; + public static final String COLUMN_DESCRIPTION = "description"; /** * The detailed, lengthy description of this TV program that is displayed only when the user * wants to see more information. ** TV input services should leave this field empty if they have no additional - * details beyond {@link #DESCRIPTION}. + * details beyond {@link #COLUMN_DESCRIPTION}. *
* Type: TEXT *
*/ - public static final String LONG_DESCRIPTION = "long_description"; + public static final String COLUMN_LONG_DESCRIPTION = "long_description"; /** * Generic data used by TV input services. @@ -495,7 +571,7 @@ public final class TvContract { * Type: BLOB * */ - public static final String DATA = "data"; + public static final String COLUMN_DATA = "data"; /** * The version number of this row entry used by TV input services. @@ -508,7 +584,7 @@ public final class TvContract { * Type: INTEGER * */ - public static final String VERSION_NUMBER = "version_number"; + public static final String COLUMN_VERSION_NUMBER = "version_number"; private Programs() {} } @@ -540,7 +616,8 @@ public final class TvContract { * Type: INTEGER (long) * */ - public static final String WATCH_START_TIME_UTC_MILLIS = "watch_start_time_utc_millis"; + public static final String COLUMN_WATCH_START_TIME_UTC_MILLIS = + "watch_start_time_utc_millis"; /** * The UTC time that the user stopped watching this TV program, in milliseconds since the @@ -549,7 +626,7 @@ public final class TvContract { * Type: INTEGER (long) * */ - public static final String WATCH_END_TIME_UTC_MILLIS = "watch_end_time_utc_millis"; + public static final String COLUMN_WATCH_END_TIME_UTC_MILLIS = "watch_end_time_utc_millis"; /** * The channel ID that contains this TV program. @@ -557,7 +634,7 @@ public final class TvContract { * Type: INTEGER (long) * */ - public static final String CHANNEL_ID = "channel_id"; + public static final String COLUMN_CHANNEL_ID = "channel_id"; /** * The title of this TV program. @@ -565,7 +642,7 @@ public final class TvContract { * Type: TEXT * */ - public static final String TITLE = "title"; + public static final String COLUMN_TITLE = "title"; /** * The start time of this TV program, in milliseconds since the epoch. @@ -573,7 +650,7 @@ public final class TvContract { * Type: INTEGER (long) * */ - public static final String START_TIME_UTC_MILLIS = "start_time_utc_millis"; + public static final String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis"; /** * The end time of this TV program, in milliseconds since the epoch. @@ -581,7 +658,7 @@ public final class TvContract { * Type: INTEGER (long) * */ - public static final String END_TIME_UTC_MILLIS = "end_time_utc_millis"; + public static final String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis"; /** * The description of this TV program. @@ -589,7 +666,7 @@ public final class TvContract { * Type: TEXT * */ - public static final String DESCRIPTION = "description"; + public static final String COLUMN_DESCRIPTION = "description"; private WatchedPrograms() {} } diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index 05f99475a4953..8ad7fffff6652 100644 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java @@ -648,10 +648,10 @@ public final class TvInputManagerService extends SystemService { // Create a log entry and fill it later. ContentValues values = new ContentValues(); - values.put(TvContract.WatchedPrograms.WATCH_START_TIME_UTC_MILLIS, + values.put(TvContract.WatchedPrograms.COLUMN_WATCH_START_TIME_UTC_MILLIS, currentTime); - values.put(TvContract.WatchedPrograms.WATCH_END_TIME_UTC_MILLIS, 0); - values.put(TvContract.WatchedPrograms.CHANNEL_ID, channelId); + values.put(TvContract.WatchedPrograms.COLUMN_WATCH_END_TIME_UTC_MILLIS, 0); + values.put(TvContract.WatchedPrograms.COLUMN_CHANNEL_ID, channelId); sessionState.mLogUri = mContentResolver.insert( TvContract.WatchedPrograms.CONTENT_URI, values); @@ -944,31 +944,32 @@ public final class TvInputManagerService extends SystemService { private void onOpenEntry(Uri uri, long channelId, long watchStarttime) { String[] projection = { - TvContract.Programs.TITLE, - TvContract.Programs.START_TIME_UTC_MILLIS, - TvContract.Programs.END_TIME_UTC_MILLIS, - TvContract.Programs.DESCRIPTION + TvContract.Programs.COLUMN_TITLE, + TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS, + TvContract.Programs.COLUMN_END_TIME_UTC_MILLIS, + TvContract.Programs.COLUMN_DESCRIPTION }; - String selection = TvContract.Programs.CHANNEL_ID + "=? AND " - + TvContract.Programs.START_TIME_UTC_MILLIS + "<=? AND " - + TvContract.Programs.END_TIME_UTC_MILLIS + ">?"; + String selection = TvContract.Programs.COLUMN_CHANNEL_ID + "=? AND " + + TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS + "<=? AND " + + TvContract.Programs.COLUMN_END_TIME_UTC_MILLIS + ">?"; String[] selectionArgs = { String.valueOf(channelId), String.valueOf(watchStarttime), String.valueOf(watchStarttime) }; - String sortOrder = TvContract.Programs.START_TIME_UTC_MILLIS + " ASC"; + String sortOrder = TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS + " ASC"; Cursor cursor = null; try { cursor = mContentResolver.query(TvContract.Programs.CONTENT_URI, projection, selection, selectionArgs, sortOrder); if (cursor != null && cursor.moveToNext()) { ContentValues values = new ContentValues(); - values.put(TvContract.WatchedPrograms.TITLE, cursor.getString(0)); - values.put(TvContract.WatchedPrograms.START_TIME_UTC_MILLIS, cursor.getLong(1)); + values.put(TvContract.WatchedPrograms.COLUMN_TITLE, cursor.getString(0)); + values.put(TvContract.WatchedPrograms.COLUMN_START_TIME_UTC_MILLIS, + cursor.getLong(1)); long endTime = cursor.getLong(2); - values.put(TvContract.WatchedPrograms.END_TIME_UTC_MILLIS, endTime); - values.put(TvContract.WatchedPrograms.DESCRIPTION, cursor.getString(3)); + values.put(TvContract.WatchedPrograms.COLUMN_END_TIME_UTC_MILLIS, endTime); + values.put(TvContract.WatchedPrograms.COLUMN_DESCRIPTION, cursor.getString(3)); mContentResolver.update(uri, values, null, null); // Schedule an update when the current program ends. @@ -988,12 +989,12 @@ public final class TvInputManagerService extends SystemService { private void onUpdateEntry(Uri uri, long channelId, long time) { String[] projection = { - TvContract.WatchedPrograms.WATCH_START_TIME_UTC_MILLIS, - TvContract.WatchedPrograms.WATCH_END_TIME_UTC_MILLIS, - TvContract.WatchedPrograms.TITLE, - TvContract.WatchedPrograms.START_TIME_UTC_MILLIS, - TvContract.WatchedPrograms.END_TIME_UTC_MILLIS, - TvContract.WatchedPrograms.DESCRIPTION + TvContract.WatchedPrograms.COLUMN_WATCH_START_TIME_UTC_MILLIS, + TvContract.WatchedPrograms.COLUMN_WATCH_END_TIME_UTC_MILLIS, + TvContract.WatchedPrograms.COLUMN_TITLE, + TvContract.WatchedPrograms.COLUMN_START_TIME_UTC_MILLIS, + TvContract.WatchedPrograms.COLUMN_END_TIME_UTC_MILLIS, + TvContract.WatchedPrograms.COLUMN_DESCRIPTION }; Cursor cursor = null; try { @@ -1014,14 +1015,14 @@ public final class TvInputManagerService extends SystemService { // The current program has just ended. Create a (complete) log entry off the // current entry. ContentValues values = new ContentValues(); - values.put(TvContract.WatchedPrograms.WATCH_START_TIME_UTC_MILLIS, + values.put(TvContract.WatchedPrograms.COLUMN_WATCH_START_TIME_UTC_MILLIS, watchStartTime); - values.put(TvContract.WatchedPrograms.WATCH_END_TIME_UTC_MILLIS, time); - values.put(TvContract.WatchedPrograms.CHANNEL_ID, channelId); - values.put(TvContract.WatchedPrograms.TITLE, title); - values.put(TvContract.WatchedPrograms.START_TIME_UTC_MILLIS, startTime); - values.put(TvContract.WatchedPrograms.END_TIME_UTC_MILLIS, endTime); - values.put(TvContract.WatchedPrograms.DESCRIPTION, description); + values.put(TvContract.WatchedPrograms.COLUMN_WATCH_END_TIME_UTC_MILLIS, time); + values.put(TvContract.WatchedPrograms.COLUMN_CHANNEL_ID, channelId); + values.put(TvContract.WatchedPrograms.COLUMN_TITLE, title); + values.put(TvContract.WatchedPrograms.COLUMN_START_TIME_UTC_MILLIS, startTime); + values.put(TvContract.WatchedPrograms.COLUMN_END_TIME_UTC_MILLIS, endTime); + values.put(TvContract.WatchedPrograms.COLUMN_DESCRIPTION, description); mContentResolver.insert(TvContract.WatchedPrograms.CONTENT_URI, values); } } finally { @@ -1035,7 +1036,7 @@ public final class TvInputManagerService extends SystemService { private void onCloseEntry(Uri uri, long watchEndTime) { ContentValues values = new ContentValues(); - values.put(TvContract.WatchedPrograms.WATCH_END_TIME_UTC_MILLIS, watchEndTime); + values.put(TvContract.WatchedPrograms.COLUMN_WATCH_END_TIME_UTC_MILLIS, watchEndTime); mContentResolver.update(uri, values, null, null); } }