import java.util.Map;
/**
- * <p>
* The contract between the TV provider and applications. Contains definitions for the supported
* URIs and columns.
- * </p>
* <h3>Overview</h3>
- * <p>
- * TvContract defines a basic database of TV content metadata such as channel and program
+ *
+ * <p>TvContract defines a basic database of TV content metadata such as channel and program
* information. The information is stored in {@link Channels} and {@link Programs} tables.
- * </p>
+ *
* <ul>
* <li>A row in the {@link Channels} table represents information about a TV channel. The data
* format can vary greatly from standard to standard or according to service provider, thus
public interface BaseTvColumns extends BaseColumns {
/**
* The name of the package that owns a row in each table.
- * <p>
- * The TV provider fills it in with the name of the package that provides the initial data
+ *
+ * <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><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_PACKAGE_NAME = "package_name";
}
/**
* The ID of the TV input service that provides this TV channel.
- * <p>
- * Use {@link #buildInputId} to build the ID.
- * </p><p>
- * This is a required field.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Use {@link #buildInputId} to build the ID.
+ *
+ * <p>This is a required field.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_INPUT_ID = "input_id";
/**
* The predefined type of this TV channel.
- * <p>
- * This is primarily used to indicate which broadcast standard (e.g. ATSC, DVB or ISDB) the
- * current channel conforms to. The value should match to one of the followings:
+ *
+ * <p>This is primarily used to indicate which broadcast standard (e.g. ATSC, DVB or ISDB)
+ * the current channel conforms to. The value should match to one of the followings:
* {@link #TYPE_OTHER}, {@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}
- * </p><p>
- * This is a required field.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>This is a required field.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_TYPE = "type";
/**
* The predefined service type of this TV channel.
- * <p>
- * 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
+ *
+ * <p>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_AUDIO_VIDEO}, {@link #SERVICE_TYPE_AUDIO}
- * </p><p>
- * This is a required field.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>This is a required field.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_SERVICE_TYPE = "service_type";
/**
* The original network ID of this TV channel.
- * <p>
- * This is used to identify the originating delivery system, if applicable. Use the same
+ *
+ * <p>This is used to identify the originating delivery system, if applicable. Use the same
* coding for {@code original_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.
- * </p><p>
- * This is a required field if the channel cannot be uniquely identified by a 2-tuple
+ *
+ * <p>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}}.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_ORIGINAL_NETWORK_ID = "original_network_id";
/**
* The transport stream ID of this channel.
- * <p>
- * 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
+ *
+ * <p>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.
- * </p><p>
- * This is a required field if the current channel is transmitted via the MPEG Transport
+ *
+ * <p>This is a required field if the current channel is transmitted via the MPEG Transport
* Stream.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_TRANSPORT_STREAM_ID = "transport_stream_id";
/**
* The service ID of this channel.
- * <p>
- * This is used to identify the current service (roughly equivalent to channel) from any
+ *
+ * <p>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.
- * </p><p>
- * This is a required field if the current channel is transmitted via the MPEG Transport
+ *
+ * <p>This is a required field if the current channel is transmitted via the MPEG Transport
* Stream.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_SERVICE_ID = "service_id";
/**
* The channel number that is displayed to the user.
- * <p>
- * The format can vary depending on broadcast standard and product specification.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>The format can vary depending on broadcast standard and product specification.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_DISPLAY_NUMBER = "display_number";
/**
* The channel name that is displayed to the user.
- * <p>
- * A call sign is a good candidate to use for this purpose but any name that helps the user
- * recognize the current channel will be enough. Can also be empty depending on broadcast
- * standard.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>A call sign is a good candidate to use for this purpose but any name that helps the
+ * user recognize the current channel will be enough. Can also be empty depending on
+ * broadcast standard.
+ *
+ * <p> Type: TEXT
*/
public static final String COLUMN_DISPLAY_NAME = "display_name";
/**
* The network affiliation for this TV channel.
- * <p>
- * This is used to identify a channel that is commonly called by its network affiliation
+ *
+ * <p>This is used to identify a channel that is commonly called by its network affiliation
* instead of the display name. Examples include ABC for the channel KGO-HD, FOX for the
* channel KTVU-HD and NBC for the channel KNTV-HD. Can be empty if not applicable.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_NETWORK_AFFILIATION = "network_affiliation";
/**
* The description of this TV channel.
- * <p>
- * Can be empty initially.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Can be empty initially.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_DESCRIPTION = "description";
/**
* The typical video format for programs from this TV channel.
- * <p>
- * This is primarily used to filter out channels based on video format by applications. The
- * value should match one of the followings: {@link #VIDEO_FORMAT_240P},
+ *
+ * <p>This is primarily used to filter out channels based on video format by applications.
+ * The value should match one of the followings: {@link #VIDEO_FORMAT_240P},
* {@link #VIDEO_FORMAT_360P}, {@link #VIDEO_FORMAT_480I}, {@link #VIDEO_FORMAT_480P},
* {@link #VIDEO_FORMAT_576I}, {@link #VIDEO_FORMAT_576P}, {@link #VIDEO_FORMAT_720P},
* {@link #VIDEO_FORMAT_1080I}, {@link #VIDEO_FORMAT_1080P}, {@link #VIDEO_FORMAT_2160P},
* {@link #VIDEO_FORMAT_4320P}. Note that the actual video resolution of each program from a
* given channel can vary thus one should use {@link Programs#COLUMN_VIDEO_WIDTH} and
* {@link Programs#COLUMN_VIDEO_HEIGHT} to get more accurate video resolution.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
+ *
* @see #getVideoResolution
*/
public static final String COLUMN_VIDEO_FORMAT = "video_format";
/**
* The flag indicating whether this TV channel is browsable or not.
- * <p>
- * 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 0 (not browsable) by default.
- * </p><p>
- * Type: INTEGER (boolean)
- * </p>
+ *
+ * <p>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 0 (not browsable) by default.
+ *
+ * <p>Type: INTEGER (boolean)
* @hide
*/
@SystemApi
/**
* 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
+ *
+ * <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><p>
- * Type: INTEGER (boolean)
- * </p>
+ *
+ * <p>Type: INTEGER (boolean)
*/
public static final String COLUMN_SEARCHABLE = "searchable";
/**
* The flag indicating whether this TV channel is locked or not.
- * <p>
- * This is primarily used for alternative parental control to prevent unauthorized users
+ *
+ * <p>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.
- * </p><p>
- * Type: INTEGER (boolean)
- * </p>
+ *
+ * <p>Type: INTEGER (boolean)
* @hide
*/
@SystemApi
/**
* 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
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: BLOB
- * </p>
+ *
+ * <p>Type: BLOB
*/
public static final String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
/**
* Internal integer flag used by individual TV input services.
- * <p>
- * This is internal to the provider that inserted it, and should not be decoded by other
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
/**
* Internal integer flag used by individual TV input services.
- * <p>
- * This is internal to the provider that inserted it, and should not be decoded by other
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
/**
* Internal integer flag used by individual TV input services.
- * <p>
- * This is internal to the provider that inserted it, and should not be decoded by other
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
/**
* Internal integer flag used by individual TV input services.
- * <p>
- * This is internal to the provider that inserted it, and should not be decoded by other
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
/**
* The version number of this row entry used by TV input services.
- * <p>
- * This is best used by sync adapters to identify the rows to update. The number can be
+ *
+ * <p>This is best used by sync adapters to identify the rows to update. The number can be
* defined by individual TV input services. One may assign the same value as
* {@code version_number} that appears in ETSI EN 300 468 or ATSC A/65, if the data are
* coming from a TV broadcast.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_VERSION_NUMBER = "version_number";
/**
* A sub-directory of a single TV channel that represents its primary logo.
- * <p>
- * To access this directory, append {@link Channels.Logo#CONTENT_DIRECTORY} to the raw
+ *
+ * <p>To access this directory, append {@link Channels.Logo#CONTENT_DIRECTORY} to the raw
* channel URI. The resulting URI represents an image file, and should be interacted
* using ContentResolver.openAssetFileDescriptor.
- * </p><p>
- * Note that this sub-directory also supports opening the logo as an asset file in write
+ *
+ * <p>Note that this sub-directory also supports opening the logo as an asset file in write
* mode. Callers can create or replace the primary logo associated with this channel by
* opening the asset file and writing the full-size photo contents into it. (Make sure there
* is no padding around the logo image.) When the file is closed, the image will be parsed,
* sized down if necessary, and stored.
- * </p><p>
- * Usage example:
+ *
+ * <p>Usage example:
* <pre>
* public void writeChannelLogo(long channelId, byte[] logo) {
* Uri channelLogoUri = TvContract.buildChannelLogoUri(channelId);
* }
* }
* </pre>
- * </p>
*/
public static final class Logo {
/**
* Column definitions for the TV programs table.
- * <p>
- * By default, the query results will be sorted by {@link Programs#COLUMN_START_TIME_UTC_MILLIS}
- * in ascending order.
- * </p>
+ *
+ * <p>By default, the query results will be sorted by
+ * {@link Programs#COLUMN_START_TIME_UTC_MILLIS} in ascending order.
*/
public static final class Programs implements BaseTvColumns {
/**
* The ID of the TV channel that provides this TV program.
- * <p>
- * This is a part of the channel URI and matches to {@link BaseColumns#_ID}.
- * </p><p>
- * Type: INTEGER (long)
- * </p>
+ *
+ * <p>This is a part of the channel URI and matches to {@link BaseColumns#_ID}.
+ *
+ * <p>Type: INTEGER (long)
*/
public static final String COLUMN_CHANNEL_ID = "channel_id";
/**
* The title of this TV program.
- * <p>
- * If this program is an episodic TV show, it is recommended that the title is the series
+ *
+ * <p>If this program is an episodic TV show, it is recommended that the title is the series
* title and its related fields ({@link #COLUMN_SEASON_NUMBER},
* {@link #COLUMN_EPISODE_NUMBER}, and {@link #COLUMN_EPISODE_TITLE}) are filled in.
- * </p><p>
- * Type: TEXT
- * </p>
- **/
+ *
+ * <p>Type: TEXT
+ */
public static final String COLUMN_TITLE = "title";
/**
* The season number of this TV program for episodic TV shows.
- * <p>
- * Can be empty.
- * </p><p>
- * Type: INTEGER
- * </p>
- **/
+ *
+ * <p>Can be empty.
+ *
+ * <p>Type: INTEGER
+ */
public static final String COLUMN_SEASON_NUMBER = "season_number";
/**
* The episode number of this TV program for episodic TV shows.
- * <p>
- * Can be empty.
- * </p><p>
- * Type: INTEGER
- * </p>
- **/
+ *
+ * <p>Can be empty.
+ *
+ * <p>Type: INTEGER
+ */
public static final String COLUMN_EPISODE_NUMBER = "episode_number";
/**
* The episode title of this TV program for episodic TV shows.
- * <p>
- * Can be empty.
- * </p><p>
- * Type: TEXT
- * </p>
- **/
+ *
+ * <p>Can be empty.
+ *
+ * <p>Type: TEXT
+ */
public static final String COLUMN_EPISODE_TITLE = "episode_title";
/**
* The start time of this TV program, in milliseconds since the epoch.
- * <p>
- * The value should be equal to or larger than {@link #COLUMN_END_TIME_UTC_MILLIS} of the
+ *
+ * <p>The value should be equal to or larger than {@link #COLUMN_END_TIME_UTC_MILLIS} of the
* previous program in the same channel.
- * </p><p>
- * Type: INTEGER (long)
- * </p>
+ *
+ * <p>Type: INTEGER (long)
*/
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.
- * <p>
- * The value should be equal to or less than {@link #COLUMN_START_TIME_UTC_MILLIS} of the
+ *
+ * <p>The value should be equal to or less than {@link #COLUMN_START_TIME_UTC_MILLIS} of the
* next program in the same channel.
- * </p><p>
- * Type: INTEGER (long)
- * </p>
+ *
+ * <p>Type: INTEGER (long)
*/
public static final String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
/**
* The comma-separated genre string of this TV program.
- * <p>
- * 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
+ *
+ * <p>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, leave empty.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_BROADCAST_GENRE = "broadcast_genre";
/**
* The comma-separated canonical genre string of this TV program.
- * <p>
- * Canonical genres are defined in {@link Genres}. Use {@link Genres#encode Genres.encode()}
- * to create a text that can be stored in this column. Use {@link Genres#decode
- * Genres.decode()} to get the canonical genre strings from the text stored in this column.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Canonical genres are defined in {@link Genres}. Use
+ * {@link Genres#encode Genres.encode()} to create a text that can be stored in this column.
+ * Use {@link Genres#decode Genres.decode()} to get the canonical genre strings from the
+ * text stored in this column.
+ *
+ * <p>Type: TEXT
* @see Genres
*/
public static final String COLUMN_CANONICAL_GENRE = "canonical_genre";
/**
* The short description of this TV program that is displayed to the user by default.
- * <p>
- * It is recommended to limit the length of the descriptions to 256 characters.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>It is recommended to limit the length of the descriptions to 256 characters.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_SHORT_DESCRIPTION = "short_description";
/**
* The detailed, lengthy description of this TV program that is displayed only when the user
* wants to see more information.
- * <p>
- * TV input services should leave this field empty if they have no additional details beyond
- * {@link #COLUMN_SHORT_DESCRIPTION}.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>TV input services should leave this field empty if they have no additional details
+ * beyond {@link #COLUMN_SHORT_DESCRIPTION}.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_LONG_DESCRIPTION = "long_description";
/**
* The width of the video for this TV program, in the unit of pixels.
- * <p>
- * Together with {@link #COLUMN_VIDEO_HEIGHT} this is used to determine the video resolution
- * of the current TV program. Can be empty if it is not known initially or the program does
- * not convey any video such as the programs from type {@link Channels#SERVICE_TYPE_AUDIO}
- * channels.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Together with {@link #COLUMN_VIDEO_HEIGHT} this is used to determine the video
+ * resolution of the current TV program. Can be empty if it is not known initially or the
+ * program does not convey any video such as the programs from type
+ * {@link Channels#SERVICE_TYPE_AUDIO} channels.
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_VIDEO_WIDTH = "video_width";
/**
* The height of the video for this TV program, in the unit of pixels.
- * <p>
- * Together with {@link #COLUMN_VIDEO_WIDTH} this is used to determine the video resolution
- * of the current TV program. Can be empty if it is not known initially or the program does
- * not convey any video such as the programs from type {@link Channels#SERVICE_TYPE_AUDIO}
- * channels.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Together with {@link #COLUMN_VIDEO_WIDTH} this is used to determine the video
+ * resolution of the current TV program. Can be empty if it is not known initially or the
+ * program does not convey any video such as the programs from type
+ * {@link Channels#SERVICE_TYPE_AUDIO} channels.
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_VIDEO_HEIGHT = "video_height";
/**
* The comma-separated audio languages of this TV program.
- * <p>
- * This is used to describe available audio languages included in the program. Use either
+ *
+ * <p>This is used to describe available audio languages included in the program. Use either
* ISO 639-1 or 639-2/T codes.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_AUDIO_LANGUAGE = "audio_language";
/**
* The comma-separated content ratings of this TV program.
- * <p>
- * This is used to describe the content rating(s) of this program. Each comma-separated
+ *
+ * <p>This is used to describe the content rating(s) of this program. Each comma-separated
* content rating sub-string should be generated by calling
* {@link TvContentRating#flattenToString}. Note that in most cases the program content is
* rated by a single rating system, thus resulting in a corresponding single sub-string that
* specified as "blocked rating" in the user's parental control settings, the TV input
* service should block the current content and wait for the signal that it is okay to
* unblock.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_CONTENT_RATING = "content_rating";
/**
* The URI for the poster art of this TV program.
- * <p>
- * Can be empty.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Can be empty.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_POSTER_ART_URI = "poster_art_uri";
/**
* The URI for the thumbnail of this TV program.
- * <p>
- * Can be empty.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Can be empty.
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_THUMBNAIL_URI = "thumbnail_uri";
/**
* 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
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: BLOB
- * </p>
+ *
+ * <p>Type: BLOB
*/
public static final String COLUMN_INTERNAL_PROVIDER_DATA = "internal_provider_data";
/**
* Internal integer flag used by individual TV input services.
- * <p>
- * This is internal to the provider that inserted it, and should not be decoded by other
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_INTERNAL_PROVIDER_FLAG1 = "internal_provider_flag1";
/**
* Internal integer flag used by individual TV input services.
- * <p>
- * This is internal to the provider that inserted it, and should not be decoded by other
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_INTERNAL_PROVIDER_FLAG2 = "internal_provider_flag2";
/**
* Internal integer flag used by individual TV input services.
- * <p>
- * This is internal to the provider that inserted it, and should not be decoded by other
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_INTERNAL_PROVIDER_FLAG3 = "internal_provider_flag3";
/**
* Internal integer flag used by individual TV input services.
- * <p>
- * This is internal to the provider that inserted it, and should not be decoded by other
+ *
+ * <p>This is internal to the provider that inserted it, and should not be decoded by other
* apps.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_INTERNAL_PROVIDER_FLAG4 = "internal_provider_flag4";
/**
* The version number of this row entry used by TV input services.
- * <p>
- * This is best used by sync adapters to identify the rows to update. The number can be
+ *
+ * <p>This is best used by sync adapters to identify the rows to update. The number can be
* defined by individual TV input services. One may assign the same value as
* {@code version_number} in ETSI EN 300 468 or ATSC A/65, if the data are coming from a TV
* broadcast.
- * </p><p>
- * Type: INTEGER
- * </p>
+ *
+ * <p>Type: INTEGER
*/
public static final String COLUMN_VERSION_NUMBER = "version_number";
/**
* Column definitions for the TV programs that the user watched. Applications do not have access
* to this table.
- * <p>
- * By default, the query results will be sorted by
+ *
+ * <p>By default, the query results will be sorted by
* {@link WatchedPrograms#COLUMN_WATCH_START_TIME_UTC_MILLIS} in descending order.
- * </p>
* @hide
*/
@SystemApi
/**
* The UTC time that the user started watching this TV program, in milliseconds since the
* epoch.
- * <p>
- * Type: INTEGER (long)
- * </p>
+ *
+ * <p>Type: INTEGER (long)
*/
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
* epoch.
- * <p>
- * Type: INTEGER (long)
- * </p>
+ *
+ * <p>Type: INTEGER (long)
*/
public static final String COLUMN_WATCH_END_TIME_UTC_MILLIS = "watch_end_time_utc_millis";
/**
* The ID of the TV channel that provides this TV program.
- * <p>
- * Type: INTEGER (long)
- * </p>
+ *
+ * <p>Type: INTEGER (long)
*/
public static final String COLUMN_CHANNEL_ID = "channel_id";
/**
* The title of this TV program.
- * <p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_TITLE = "title";
/**
* The start time of this TV program, in milliseconds since the epoch.
- * <p>
- * Type: INTEGER (long)
- * </p>
+ *
+ * <p>Type: INTEGER (long)
*/
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.
- * <p>
- * Type: INTEGER (long)
- * </p>
+ *
+ * <p>Type: INTEGER (long)
*/
public static final String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis";
/**
* The description of this TV program.
- * <p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_DESCRIPTION = "description";
* Extra parameters given to {@link TvInputService.Session#tune(Uri, android.os.Bundle)
* TvInputService.Session.tune(Uri, android.os.Bundle)} when tuning to the channel that
* provides this TV program. (Used internally.)
- * <p>
- * This column contains an encoded string that represents comma-separated key-value pairs of
+ *
+ * <p>This column contains an encoded string that represents comma-separated key-value pairs of
* the tune parameters. (Ex. "[key1]=[value1], [key2]=[value2]"). '%' is used as an escape
* character for '%', '=', and ','.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_INTERNAL_TUNE_PARAMS = "tune_params";
/**
* The session token of this TV program. (Used internally.)
- * <p>
- * This contains a String representation of {@link IBinder} for
+ *
+ * <p>This contains a String representation of {@link IBinder} for
* {@link TvInputService.Session} that provides the current TV program. It is used
* internally to distinguish watched programs entries from different TV input sessions.
- * </p><p>
- * Type: TEXT
- * </p>
+ *
+ * <p>Type: TEXT
*/
public static final String COLUMN_INTERNAL_SESSION_TOKEN = "session_token";
/**
* The TvInputService class represents a TV input or source such as HDMI or built-in tuner which
* provides pass-through video or broadcast TV programs.
- * <p>
- * Applications will not normally use this service themselves, instead relying on the standard
+ *
+ * <p>Applications will not normally use this service themselves, instead relying on the standard
* interaction provided by {@link TvView}. Those implementing TV input services should normally do
* so by deriving from this class and providing their own session implementation based on
* {@link TvInputService.Session}. All TV input services must require that clients hold the
* {@link android.Manifest.permission#BIND_TV_INPUT} in order to interact with the service; if this
* permission is not specified in the manifest, the system will refuse to bind to that TV input
* service.
- * </p>
*/
public abstract class TvInputService extends Service {
private static final boolean DEBUG = false;
/**
* Returns a concrete implementation of {@link Session}.
- * <p>
- * May return {@code null} if this TV input service fails to create a session for some reason.
- * If TV input represents an external device connected to a hardware TV input,
+ *
+ * <p>May return {@code null} if this TV input service fails to create a session for some
+ * reason. If TV input represents an external device connected to a hardware TV input,
* {@link HardwareSession} should be returned.
- * </p>
+ *
* @param inputId The ID of the TV input associated with the session.
*/
public abstract Session onCreateSession(String inputId);
/**
* Informs the application that the user is allowed to watch the current program content.
- * <p>
- * Each TV input service is required to query the system whether the user is allowed to
+ *
+ * <p>Each TV input service is required to query the system whether the user is allowed to
* watch the current program before showing it to the user if the parental controls is
* enabled (i.e. {@link TvInputManager#isParentalControlsEnabled
* TvInputManager.isParentalControlsEnabled()} returns {@code true}). Whether the TV input
* result. If the rating in question turns out to be allowed by the user, the TV input
* service must call this method to notify the application that is permitted to show the
* content.
- * </p><p>
- * Each TV input service also needs to continuously listen to any changes made to the
+ *
+ * <p>Each TV input service also needs to continuously listen to any changes made to the
* parental controls settings by registering a broadcast receiver to receive
* {@link TvInputManager#ACTION_BLOCKED_RATINGS_CHANGED} and
* {@link TvInputManager#ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED} and immediately
* reevaluate the current program with the new parental controls settings.
- * </p>
*
* @see #notifyContentBlocked
* @see TvInputManager
/**
* Informs the application that the current program content is blocked by parent controls.
- * <p>
- * Each TV input service is required to query the system whether the user is allowed to
+ *
+ * <p>Each TV input service is required to query the system whether the user is allowed to
* watch the current program before showing it to the user if the parental controls is
* enabled (i.e. {@link TvInputManager#isParentalControlsEnabled
* TvInputManager.isParentalControlsEnabled()} returns {@code true}). Whether the TV input
* result. If the rating in question turns out to be blocked, the TV input service must
* immediately block the content and call this method with the content rating of the current
* program to prompt the PIN verification screen.
- * </p><p>
- * Each TV input service also needs to continuously listen to any changes made to the
+ *
+ * <p>Each TV input service also needs to continuously listen to any changes made to the
* parental controls settings by registering a broadcast receiver to receive
* {@link TvInputManager#ACTION_BLOCKED_RATINGS_CHANGED} and
* {@link TvInputManager#ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED} and immediately
* reevaluate the current program with the new parental controls settings.
- * </p>
*
* @param rating The content rating for the current TV program.
* @see #notifyContentAllowed
/**
* Informs the application that the time shift status is changed.
- * <p>
- * Prior to calling this method, the application assumes the status
+ *
+ * <p>Prior to calling this method, the application assumes the status
* {@link TvInputManager#TIME_SHIFT_STATUS_UNKNOWN}. Right after the session is created, it
* is important to invoke the method with the status
* {@link TvInputManager#TIME_SHIFT_STATUS_AVAILABLE} if the implementation does support
* time shifting, or {@link TvInputManager#TIME_SHIFT_STATUS_UNSUPPORTED} otherwise. Failure
* to notifying the current status change immediately might result in an undesirable
* behavior in the application such as hiding the play controls.
- * </p><p>
- * If the status {@link TvInputManager#TIME_SHIFT_STATUS_AVAILABLE} is reported, the
+ *
+ * <p>If the status {@link TvInputManager#TIME_SHIFT_STATUS_AVAILABLE} is reported, the
* application assumes it can pause/resume playback, seek to a specified time position and
* set playback rate and audio mode. The implementation should override
* {@link #onTimeShiftPause}, {@link #onTimeShiftResume}, {@link #onTimeShiftSeekTo},
* {@link #onTimeShiftGetStartPosition}, {@link #onTimeShiftGetCurrentPosition} and
* {@link #onTimeShiftSetPlaybackRate}.
- * </p>
*
* @param status The current time shift status. Should be one of the followings.
* <ul>
/**
* Sets the current session as the main session. The main session is a session whose
* corresponding TV input determines the HDMI-CEC active source device.
- * <p>
- * TV input service that manages HDMI-CEC logical device should implement {@link
+ *
+ * <p>TV input service that manages HDMI-CEC logical device should implement {@link
* #onSetMain} to (1) select the corresponding HDMI logical device as the source device
* when {@code isMain} is {@code true}, and to (2) select the internal device (= TV itself)
* as the source device when {@code isMain} is {@code false} and the session is still main.
* Also, if a surface is passed to a non-main session and active source is changed to
* initiate the surface, the active source should be returned to the main session.
- * </p><p>
- * {@link TvView} guarantees that, when tuning involves a session transition, {@code
+ *
+ * <p>{@link TvView} guarantees that, when tuning involves a session transition, {@code
* onSetMain(true)} for new session is called first, {@code onSetMain(false)} for old
* session is called afterwards. This allows {@code onSetMain(false)} to be no-op when TV
* input service knows that the next main session corresponds to another HDMI logical
* device. Practically, this implies that one TV input service should handle all HDMI port
* and HDMI-CEC logical devices for smooth active source transition.
- * </p>
*
* @param isMain If true, session should become main.
* @see TvView#setMain
/**
* Sets the {@link Surface} for the current input session on which the TV input renders
* video.
- * <p>
- * When {@code setSurface(null)} is called, the implementation should stop using the Surface
- * object previously given and release any references to it.
+ *
+ * <p>When {@code setSurface(null)} is called, the implementation should stop using the
+ * Surface object previously given and release any references to it.
*
* @param surface possibly {@code null} {@link Surface} the application passes to this TV
* input session.
/**
* Enables or disables the caption.
- * <p>
- * The locale for the user's preferred captioning language can be obtained by calling
+ *
+ * <p>The locale for the user's preferred captioning language can be obtained by calling
* {@link CaptioningManager#getLocale CaptioningManager.getLocale()}.
*
* @param enabled {@code true} to enable, {@code false} to disable.
/**
* Requests to unblock the content according to the given rating.
- * <p>
- * The implementation should unblock the content.
+ *
+ * <p>The implementation should unblock the content.
* TV input service has responsibility to decide when/how the unblock expires
* while it can keep previously unblocked ratings in order not to ask a user
* to unblock whenever a content rating is changed.
* Therefore an unblocked rating can be valid for a channel, a program,
* or certain amount of time depending on the implementation.
- * </p>
*
* @param unblockedRating An unblocked content rating
*/
/**
* Selects a given track.
- * <p>
- * If this is done successfully, the implementation should call {@link #notifyTrackSelected}
- * to help applications maintain the up-to-date list of the selected tracks.
- * </p>
+ *
+ * <p>If this is done successfully, the implementation should call
+ * {@link #notifyTrackSelected} to help applications maintain the up-to-date list of the
+ * selected tracks.
*
* @param trackId The ID of the track to select. {@code null} means to unselect the current
* track for a given type.
/**
* Called when the application sets playback rate and audio mode.
- * <p>
- * Once a playback rate is set, the implementation should honor the value until a new tune
- * request. Pause/resume/seek request does not reset the playback rate previously set.
- * </p>
+ *
+ * <p>Once a playback rate is set, the implementation should honor the value until a new
+ * tune request. Pause/resume/seek request does not reset the playback rate previously set.
*
* @param rate The ratio between desired playback rate and normal one.
* @param audioMode Audio playback mode. Must be one of the supported audio modes:
* Returns the start playback position for time shifting, in milliseconds since the epoch.
* Returns {@link TvInputManager#TIME_SHIFT_INVALID_TIME} if the position is unknown at the
* moment.
- * <p>
- * The start playback position of the time shifted program should be adjusted when the
+ *
+ * <p>The start playback position of the time shifted program should be adjusted when the
* implementation cannot retain the whole recorded program due to some reason (e.g.
* limitation on storage space). It is the earliest possible time position that the user can
* seek to, thus failure to notifying its change immediately might result in bad experience
* where the application allows the user to seek to an invalid time position.
- * </p>
*
* @see #onTimeShiftResume
* @see #onTimeShiftPause
/**
* Default implementation of {@link android.view.KeyEvent.Callback#onKeyDown(int, KeyEvent)
* KeyEvent.Callback.onKeyDown()}: always returns false (doesn't handle the event).
- * <p>
- * Override this to intercept key down events before they are processed by the application.
- * If you return true, the application will not process the event itself. If you return
- * false, the normal application processing will occur as if the TV input had not seen the
- * event at all.
+ *
+ * <p>Override this to intercept key down events before they are processed by the
+ * application. If you return true, the application will not process the event itself. If
+ * you return false, the normal application processing will occur as if the TV input had not
+ * seen the event at all.
*
* @param keyCode The value in event.getKeyCode().
* @param event Description of the key event.
* Default implementation of
* {@link android.view.KeyEvent.Callback#onKeyLongPress(int, KeyEvent)
* KeyEvent.Callback.onKeyLongPress()}: always returns false (doesn't handle the event).
- * <p>
- * Override this to intercept key long press events before they are processed by the
+ *
+ * <p>Override this to intercept key long press events before they are processed by the
* application. If you return true, the application will not process the event itself. If
* you return false, the normal application processing will occur as if the TV input had not
* seen the event at all.
* Default implementation of
* {@link android.view.KeyEvent.Callback#onKeyMultiple(int, int, KeyEvent)
* KeyEvent.Callback.onKeyMultiple()}: always returns false (doesn't handle the event).
- * <p>
- * Override this to intercept special key multiple events before they are processed by the
- * application. If you return true, the application will not itself process the event. If
- * you return false, the normal application processing will occur as if the TV input had not
- * seen the event at all.
+ *
+ * <p>Override this to intercept special key multiple events before they are processed by
+ * the application. If you return true, the application will not itself process the event.
+ * If you return false, the normal application processing will occur as if the TV input had
+ * not seen the event at all.
*
* @param keyCode The value in event.getKeyCode().
* @param count The number of times the action was made.
/**
* Default implementation of {@link android.view.KeyEvent.Callback#onKeyUp(int, KeyEvent)
* KeyEvent.Callback.onKeyUp()}: always returns false (doesn't handle the event).
- * <p>
- * Override this to intercept key up events before they are processed by the application. If
- * you return true, the application will not itself process the event. If you return false,
+ *
+ * <p>Override this to intercept key up events before they are processed by the application.
+ * If you return true, the application will not itself process the event. If you return false,
* the normal application processing will occur as if the TV input had not seen the event at
* all.
*
/**
* Base class for a TV input session which represents an external device connected to a
* hardware TV input.
- * <p>
- * This class is for an input which provides channels for the external set-top box to the
+ *
+ * <p>This class is for an input which provides channels for the external set-top box to the
* application. Once a TV input returns an implementation of this class on
* {@link #onCreateSession(String)}, the framework will create a separate session for
* a hardware TV Input (e.g. HDMI 1) and forward the application's surface to the session so
* this TV input. The implementation of this class is expected to change the channel of the
* external set-top box via a proprietary protocol when {@link HardwareSession#onTune(Uri)} is
* requested by the application.
- * </p><p>
- * Note that this class is not for inputs for internal hardware like built-in tuner and HDMI 1.
- * </p>
+ *
+ * <p>Note that this class is not for inputs for internal hardware like built-in tuner and HDMI
+ * 1.
+ *
* @see #onCreateSession(String)
*/
public abstract static class HardwareSession extends Session {
/**
* Returns the hardware TV input ID the external device is connected to.
- * <p>
- * TV input is expected to provide {@link android.R.attr#setupActivity} so that
+ *
+ * <p>TV input is expected to provide {@link android.R.attr#setupActivity} so that
* the application can launch it before using this TV input. The setup activity may let
* the user select the hardware TV input to which the external device is connected. The ID
* of the selected one should be stored in the TV input so that it can be returned here.
- * </p>
*/
public abstract String getHardwareInputId();