TvInputInfo
class TvInputInfo : Parcelable
| kotlin.Any | |
| ↳ | android.media.tv.TvInputInfo |
This class is used to specify meta information of a TV input.
Summary
| Nested classes | |
|---|---|
|
A convenience builder for creating |
|
| Constants | |
|---|---|
| static String |
Used as a String extra field in setup intents created by |
| static Int |
TV input type: the TV input service represents a component port. |
| static Int |
TV input type: the TV input service represents a composite port. |
| static Int |
TV input type: the TV input service represents a display port. |
| static Int |
TV input type: the TV input service represents a DVI port. |
| static Int |
TV input type: the TV input service is HDMI. |
| static Int |
TV input type: a generic hardware TV input type. |
| static Int |
TV input type: the TV input service represents a SCART port. |
| static Int |
TV input type: the TV input service represents a SVIDEO port. |
| static Int |
TV input type: the TV input service is a tuner which provides channels. |
| static Int |
TV input type: the TV input service represents a VGA port. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Boolean |
Returns |
| Boolean |
Returns |
| Intent! |
Returns an intent to start the settings activity for this TV input. |
| Intent! |
Returns an intent to start the setup activity for this TV input. |
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Boolean |
Indicates whether some other object is "equal to" this one. |
| Bundle! |
Returns domain-specific extras associated with this TV input. |
| String! |
getId()Returns a unique ID for this TV input. |
| String! |
Returns the parent input ID. |
| ServiceInfo! |
Returns the information of the service that implements this TV input. |
| Int |
Returns the number of tuners this TV input has. |
| Int |
getType()Returns the type of this TV input. |
| Int |
hashCode()Returns a hash code value for the object. |
| Boolean |
Checks if this TV input is marked hidden by the user in the settings. |
| Boolean |
Returns |
| CharSequence! |
loadCustomLabel(context: Context!)Loads the custom label set by user in settings. |
| Drawable! |
Loads the user-displayed icon for this TV input. |
| CharSequence! |
Loads the user-displayed label for this TV input. |
| String |
toString()Returns a string representation of the object. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Used to package this object into a |
| Properties | |
|---|---|
| static Parcelable.Creator<TvInputInfo!> | |
Constants
EXTRA_INPUT_ID
static val EXTRA_INPUT_ID: String
Used as a String extra field in setup intents created by createSetupIntent() to supply the ID of a specific TV input to set up.
Value: "android.media.tv.extra.INPUT_ID"TYPE_COMPONENT
static val TYPE_COMPONENT: Int
TV input type: the TV input service represents a component port.
Value: 1004TYPE_COMPOSITE
static val TYPE_COMPOSITE: Int
TV input type: the TV input service represents a composite port.
Value: 1001TYPE_DISPLAY_PORT
static val TYPE_DISPLAY_PORT: Int
TV input type: the TV input service represents a display port.
Value: 1008TYPE_DVI
static val TYPE_DVI: Int
TV input type: the TV input service represents a DVI port.
Value: 1006TYPE_HDMI
static val TYPE_HDMI: Int
TV input type: the TV input service is HDMI. (e.g. HDMI 1)
Value: 1007TYPE_OTHER
static val TYPE_OTHER: Int
TV input type: a generic hardware TV input type.
Value: 1000TYPE_SCART
static val TYPE_SCART: Int
TV input type: the TV input service represents a SCART port.
Value: 1003TYPE_SVIDEO
static val TYPE_SVIDEO: Int
TV input type: the TV input service represents a SVIDEO port.
Value: 1002TYPE_TUNER
static val TYPE_TUNER: Int
TV input type: the TV input service is a tuner which provides channels.
Value: 0TYPE_VGA
static val TYPE_VGA: Int
TV input type: the TV input service represents a VGA port.
Value: 1005Public methods
canPauseRecording
fun canPauseRecording(): Boolean
Returns true if this TV input can pause recording TV programs, false otherwise.
canRecord
fun canRecord(): Boolean
Returns true if this TV input can record TV programs, false otherwise.
createSettingsIntent
funcreateSettingsIntent(): Intent!
Deprecated: Use createSetupIntent() instead. Settings activity is deprecated. Use setup activity instead to provide settings.
Returns an intent to start the settings activity for this TV input.
createSetupIntent
fun createSetupIntent(): Intent!
Returns an intent to start the setup activity for this TV input.
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
equals
fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
The equals method implements an equivalence relation on non-null object references:
- It is reflexive: for any non-null reference value
x,x.equals(x)should returntrue. - It is symmetric: for any non-null reference values
xandy,x.equals(y)should returntrueif and only ify.equals(x)returnstrue. - It is transitive: for any non-null reference values
x,y, andz, ifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue. - It is consistent: for any non-null reference values
xandy, multiple invocations ofx.equals(y)consistently returntrueor consistently returnfalse, provided no information used inequalscomparisons on the objects is modified. - For any non-null reference value
x,x.equals(null)should returnfalse.
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| Parameters | |
|---|---|
obj |
the reference object with which to compare. |
| Return | |
|---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getExtras
fun getExtras(): Bundle!
Returns domain-specific extras associated with this TV input.
getId
fun getId(): String!
Returns a unique ID for this TV input. The ID is generated from the package and class name implementing the TV input service.
getParentId
fun getParentId(): String!
Returns the parent input ID.
A TV input may have a parent input if the TV input is actually a logical representation of a device behind the hardware port represented by the parent input. For example, a HDMI CEC logical device, connected to a HDMI port, appears as another TV input. In this case, the parent input of this logical device is the HDMI port.
Applications may group inputs by parent input ID to provide an easier access to inputs sharing the same physical port. In the example of HDMI CEC, logical HDMI CEC devices behind the same HDMI port have the same parent ID, which is the ID representing the port. Thus applications can group the hardware HDMI port and the logical HDMI CEC devices behind it together using this method.
| Return | |
|---|---|
String! |
the ID of the parent input, if exists. Returns null if the parent input is not specified. |
getServiceInfo
fun getServiceInfo(): ServiceInfo!
Returns the information of the service that implements this TV input.
getTunerCount
fun getTunerCount(): Int
Returns the number of tuners this TV input has.
This method is valid only for inputs of type TYPE_TUNER. For inputs of other types, it returns 0.
Tuners correspond to physical/logical resources that allow reception of TV signal. Having N tuners means that the TV input is capable of receiving N different channels concurrently.
getType
fun getType(): Int
Returns the type of this TV input.
| Return | |
|---|---|
Int |
Value is one of the following: |
hashCode
fun hashCode(): Int
Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.
The general contract of hashCode is:
- Whenever it is invoked on the same object more than once during an execution of a Java application, the
hashCodemethod must consistently return the same integer, provided no information used inequalscomparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. - If two objects are equal according to the
equalsmethod, then calling thehashCodemethod on each of the two objects must produce the same integer result. - It is not required that if two objects are unequal according to the
equalsmethod, then calling thehashCodemethod on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
| Return | |
|---|---|
Int |
a hash code value for this object. |
isHidden
fun isHidden(context: Context!): Boolean
Checks if this TV input is marked hidden by the user in the settings.
| Parameters | |
|---|---|
context |
Context!: Supplies a Context used to check if this TV input is hidden. |
| Return | |
|---|---|
Boolean |
true if the user marked this TV input hidden in settings. false otherwise. |
isPassthroughInput
fun isPassthroughInput(): Boolean
Returns true if this TV input is pass-though which does not have any real channels in TvProvider. false otherwise.
loadCustomLabel
fun loadCustomLabel(context: Context!): CharSequence!
Loads the custom label set by user in settings.
| Parameters | |
|---|---|
context |
Context!: Supplies a Context used to load the custom label. |
| Return | |
|---|---|
CharSequence! |
a CharSequence containing the TV input's custom label. null if there is no custom label. |
loadIcon
fun loadIcon(context: Context): Drawable!
Loads the user-displayed icon for this TV input.
| Parameters | |
|---|---|
context |
Context: Supplies a Context used to load the icon. This value cannot be null. |
| Return | |
|---|---|
Drawable! |
a Drawable containing the TV input's icon. If the TV input does not have an icon, application's icon is returned. If it's unavailable too, null is returned. |
loadLabel
fun loadLabel(context: Context): CharSequence!
Loads the user-displayed label for this TV input.
| Parameters | |
|---|---|
context |
Context: Supplies a Context used to load the label. This value cannot be null. |
| Return | |
|---|---|
CharSequence! |
a CharSequence containing the TV input's label. If the TV input does not have a label, its name is returned. |
toString
fun toString(): String
Returns a string representation of the object.
| Return | |
|---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Used to package this object into a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: The Parcel to be written. This value cannot be null. |
flags |
Int: The flags used for parceling. |