# DeviceProductInfo

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# DeviceProductInfo

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/hardware/display/DeviceProductInfo "View this page in Java")  

```
class DeviceProductInfo : Parcelable
```

|---|------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                           ||
| ↳ | [android.hardware.display.DeviceProductInfo](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#) |

Product-specific information about the display or the directly connected device on the display chain. For example, if the display is transitively connected, this field may contain product information about the intermediate device.

## Summary

|                                                                                                                                                    Constants                                                                                                                                                    ||
|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONNECTION_TO_SINK_BUILT_IN](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_BUILT_IN:kotlin.Int) The display sink is built-in to the device                    |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONNECTION_TO_SINK_DIRECT](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_DIRECT:kotlin.Int) The device is directly connected to the display sink.             |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONNECTION_TO_SINK_TRANSITIVE](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_TRANSITIVE:kotlin.Int) The device is transitively connected to the display sink. |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONNECTION_TO_SINK_UNKNOWN](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_UNKNOWN:kotlin.Int) The device connection to the display sink is unknown.           |

| Inherited constants ||
|---|---|
| From class[Parcelable](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#) |----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) <br /> Descriptor bit used with[describeContents()](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor. <br />                                                                                                                                                                                                        | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int) <br /> Flag for use with[writeToParcel](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)): the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". Some implementations may want to release resources at this point. <br /> | ||

|                                                                                                                                                                                                                                                                                                                                                        Public constructors                                                                                                                                                                                                                                                                                                                                                        ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [DeviceProductInfo](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#DeviceProductInfo(kotlin.String,%20kotlin.String,%20kotlin.String,%20kotlin.Int,%20kotlin.Int))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `manufacturerPnpId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `productId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `modelYear:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `connectionToSinkType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> |

|                                                                                                                                                                                                                             Public methods                                                                                                                                                                                                                             ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [describeContents](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#describeContents())`()` <br />                                                                                                                                                                                                                                        |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` Indicates whether some other object is "equal to" this one.                                                                                                       |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getConnectionToSinkType](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#getConnectionToSinkType())`()` <br />                                                                                                                                                                                                                          |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getManufactureWeek](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#getManufactureWeek())`()` <br />                                                                                                                                                                                                                                    |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getManufactureYear](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#getManufactureYear())`()` <br />                                                                                                                                                                                                                                    |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)   | [getManufacturerPnpId](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#getManufacturerPnpId())`()` Returns the Manufacturer Plug and Play ID.                                                                                                                                                                                            |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getModelYear](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#getModelYear())`()` <br />                                                                                                                                                                                                                                                |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?  | [getName](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#getName())`()` <br />                                                                                                                                                                                                                                                          |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)   | [getProductId](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#getProductId())`()` <br />                                                                                                                                                                                                                                                |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#hashCode())`()` <br />                                                                                                                                                                                                                                                        |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)   | [toString](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#toString())`()` <br />                                                                                                                                                                                                                                                        |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [writeToParcel](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`dest:` `[Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#)`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Flatten this object in to a Parcel. |

|                                                                                                                                                                                      Properties                                                                                                                                                                                       ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Parcelable.Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator.html#)\<[DeviceProductInfo](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#)!\> | [CREATOR](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CREATOR:android.os.Parcelable.Creator) <br /> |

## Constants

### CONNECTION_TO_SINK_BUILT_IN

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CONNECTION_TO_SINK_BUILT_IN: Int
```

The display sink is built-in to the device  

    Value: 1

### CONNECTION_TO_SINK_DIRECT

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CONNECTION_TO_SINK_DIRECT: Int
```

The device is directly connected to the display sink.  

    Value: 2

### CONNECTION_TO_SINK_TRANSITIVE

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CONNECTION_TO_SINK_TRANSITIVE: Int
```

The device is transitively connected to the display sink.  

    Value: 3

### CONNECTION_TO_SINK_UNKNOWN

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CONNECTION_TO_SINK_UNKNOWN: Int
```

The device connection to the display sink is unknown.  

    Value: 0

## Public constructors

### DeviceProductInfo

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
DeviceProductInfo(
    name: String?, 
    manufacturerPnpId: String, 
    productId: String, 
    modelYear: Int, 
    connectionToSinkType: Int)
```

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name`                 | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?:This value may be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `manufacturerPnpId`    | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `productId`            | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `modelYear`            | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Value is 1990 or greater                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `connectionToSinkType` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Value is[android.hardware.display.DeviceProductInfo#CONNECTION_TO_SINK_UNKNOWN](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_UNKNOWN:kotlin.Int),[android.hardware.display.DeviceProductInfo#CONNECTION_TO_SINK_BUILT_IN](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_BUILT_IN:kotlin.Int),[android.hardware.display.DeviceProductInfo#CONNECTION_TO_SINK_DIRECT](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_DIRECT:kotlin.Int), or[android.hardware.display.DeviceProductInfo#CONNECTION_TO_SINK_TRANSITIVE](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_TRANSITIVE:kotlin.Int) |

## Public methods

### describeContents

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun describeContents(): Int
```

|                                                                                                                                                                               Return                                                                                                                                                                               ||
|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either`0`or[android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) |

### equals

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
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 return`true`.
- It is*symmetric* : for any non-null reference values`x`and`y`,`x.equals(y)`should return`true`if and only if`y.equals(x)`returns`true`.
- It is*transitive* : for any non-null reference values`x`,`y`, and`z`, if`x.equals(y)`returns`true`and`y.equals(z)`returns`true`, then`x.equals(z)`should return`true`.
- It is*consistent* : for any non-null reference values`x`and`y`, multiple invocations of`x.equals(y)`consistently return`true`or consistently return`false`, provided no information used in`equals`comparisons on the objects is modified.
- For any non-null reference value`x`,`x.equals(null)`should return`false`.

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. |
| `o`   | This value may be`null`.                    |

|                                                                           Return                                                                           ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if this object is the same as the obj argument;`false`otherwise. |

### getConnectionToSinkType

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getConnectionToSinkType(): Int
```

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Return                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ||
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | How the current device is connected to the display sink. For example, the display can be connected immediately to the device or there can be a receiver in between. Value is[android.hardware.display.DeviceProductInfo#CONNECTION_TO_SINK_UNKNOWN](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_UNKNOWN:kotlin.Int),[android.hardware.display.DeviceProductInfo#CONNECTION_TO_SINK_BUILT_IN](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_BUILT_IN:kotlin.Int),[android.hardware.display.DeviceProductInfo#CONNECTION_TO_SINK_DIRECT](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_DIRECT:kotlin.Int), or[android.hardware.display.DeviceProductInfo#CONNECTION_TO_SINK_TRANSITIVE](https://developer.android.com/reference/kotlin/android/hardware/display/DeviceProductInfo#CONNECTION_TO_SINK_TRANSITIVE:kotlin.Int) |

### getManufactureWeek

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getManufactureWeek(): Int
```

|                                                                                                                         Return                                                                                                                          ||
|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The week of manufacture which ranges from 1 to 53, or -1 it is not available. Typically, it is not present if model year is available. Value is between -1 and 53 inclusive |

### getManufactureYear

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getManufactureYear(): Int
```

|                                                                                                        Return                                                                                                         ||
|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The year of manufacture, or -1 it is not available. Typically, one of model year or manufacture year is available. Value is -1 or greater |

### getManufacturerPnpId

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getManufacturerPnpId(): String
```

Returns the Manufacturer Plug and Play ID. This ID identifies the manufacture according to the list: https://uefi.org/PNP_ID_List. It consist of 3 characters, each character is an uppercase letter (A-Z).

|                                                                    Return                                                                    ||
|----------------------------------------------------------------------------------|------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | Manufacturer Plug and Play ID. This value cannot be`null`. |

### getModelYear

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getModelYear(): Int
```

|                                                                                                         Return                                                                                                          ||
|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Model year of the device. Return -1 if not available. Typically, one of model year or manufacture year is available. Value is -1 or greater |

### getName

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getName(): String?
```

|                                                          Return                                                           ||
|-----------------------------------------------------------------------------------|----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | Display name. This value may be`null`. |

### getProductId

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getProductId(): String
```

|                                                                 Return                                                                 ||
|----------------------------------------------------------------------------------|------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | Manufacturer product ID. This value cannot be`null`. |

### hashCode

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun hashCode(): Int
```

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |

### toString

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun toString(): String
```

|                                                          Return                                                          ||
|----------------------------------------------------------------------------------|----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |

### writeToParcel

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun writeToParcel(
    dest: Parcel, 
    flags: Int
): Unit
```

Flatten this object in to a Parcel.

|                                                                                                                                                                                                                                                                                     Parameters                                                                                                                                                                                                                                                                                     ||
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `dest`  | [Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#):This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `flags` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Additional flags about how the object should be written. May be 0 or[PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int). Value is either`0`or a combination of[android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |

## Properties

### CREATOR

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CREATOR: Parcelable.Creator<DeviceProductInfo!>
```