Builder


class Builder
kotlin.Any
   ↳ android.hardware.display.DeviceProductInfo.Builder

Builder for DeviceProductInfo.

Summary

Public constructors
Builder(manufacturerPnpId: String, productId: String)

Creates a new Builder.

Public methods
DeviceProductInfo

Builds a new DeviceProductInfo instance.

DeviceProductInfo.Builder
setConnectionToSinkType(connectionToSinkType: Int)

Sets how the current device is connected to the display sink.

DeviceProductInfo.Builder
setEdidStructureMetadata(edidStructureVersion: Int, edidStructureRevision: Int)

Sets the EDID structure metadata.

DeviceProductInfo.Builder
setManufactureDate(manufactureWeek: Int, manufactureYear: Int)

Sets the manufacturing week and year of the device.

DeviceProductInfo.Builder
setManufacturerPnpId(manufacturerPnpId: String)

Sets the Manufacturer Plug and Play ID.

DeviceProductInfo.Builder
setModelYear(modelYear: Int)

Sets the model year of the device.

DeviceProductInfo.Builder
setName(name: String?)

Sets the display name.

DeviceProductInfo.Builder
setProductId(productId: String)

Sets the product ID.

DeviceProductInfo.Builder
setVideoInputType(videoInputType: Int)

Sets the video input type of the device.

Public constructors

Builder

Builder(
    manufacturerPnpId: String,
    productId: String)

Creates a new Builder.

Parameters
manufacturerPnpId String: The Manufacturer Plug and Play ID.
This value cannot be null.
productId String: The product ID.
This value cannot be null.

Public methods

build

fun build(): DeviceProductInfo

Builds a new DeviceProductInfo instance.

Return
DeviceProductInfo A new DeviceProductInfo.
This value cannot be null.

setEdidStructureMetadata

fun setEdidStructureMetadata(
    edidStructureVersion: Int,
    edidStructureRevision: Int
): DeviceProductInfo.Builder

Sets the EDID structure metadata. If left unset, EdidStructureMetadata will be null.

Parameters
edidStructureVersion Int: The EDID version, must be >= 0.
Value is 0 or greater
edidStructureRevision Int: The EDID revision, must be >= 0.
Value is 0 or greater
Return
DeviceProductInfo.Builder This builder.

setManufactureDate

fun setManufactureDate(
    manufactureWeek: Int,
    manufactureYear: Int
): DeviceProductInfo.Builder

Sets the manufacturing week and year of the device.

Parameters
manufactureWeek Int: Week of manufacturing, must be >= 1 and <=53, or -1 if not available.
Value is between -1 and 53 inclusive
manufactureYear Int: Year of manufacturing, must be >= 1990, or -1 if not available.
Value is -1 or greater
Return
DeviceProductInfo.Builder This value cannot be null.

setManufacturerPnpId

fun setManufacturerPnpId(manufacturerPnpId: String): DeviceProductInfo.Builder

Sets the Manufacturer Plug and Play ID.

Parameters
manufacturerPnpId String: The Manufacturer Plug and Play ID.
This value cannot be null.
Return
DeviceProductInfo.Builder This builder.
This value cannot be null.

setModelYear

fun setModelYear(modelYear: Int): DeviceProductInfo.Builder

Sets the model year of the device.

Parameters
modelYear Int: The model year, must be >= 1990, or -1 if not available.
Value is -1 or greater
Return
DeviceProductInfo.Builder This builder.
This value cannot be null.

setName

fun setName(name: String?): DeviceProductInfo.Builder

Sets the display name.

Parameters
name String?: The display name.
This value may be null.
Return
DeviceProductInfo.Builder This builder.
This value cannot be null.

setProductId

fun setProductId(productId: String): DeviceProductInfo.Builder

Sets the product ID.

Parameters
productId String: The product ID.
This value cannot be null.
Return
DeviceProductInfo.Builder This builder.
This value cannot be null.

setVideoInputType

fun setVideoInputType(videoInputType: Int): DeviceProductInfo.Builder

Sets the video input type of the device.

Parameters
videoInputType Int: The video input type.
Value is one of the following:
Return
DeviceProductInfo.Builder This builder.
This value cannot be null.