DeviceProductInfo.Builder


public static final class DeviceProductInfo.Builder
extends Object

java.lang.Object
   ↳ android.hardware.display.DeviceProductInfo.Builder


Builder for DeviceProductInfo.

Summary

Public constructors

Builder(String manufacturerPnpId, String productId)

Creates a new Builder.

Public methods

DeviceProductInfo build()

Builds a new DeviceProductInfo instance.

DeviceProductInfo.Builder setConnectionToSinkType(int connectionToSinkType)

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

DeviceProductInfo.Builder setEdidStructureMetadata(int edidStructureVersion, int edidStructureRevision)

Sets the EDID structure metadata.

DeviceProductInfo.Builder setManufactureDate(int manufactureWeek, int manufactureYear)

Sets the manufacturing week and year of the device.

DeviceProductInfo.Builder setManufacturerPnpId(String manufacturerPnpId)

Sets the Manufacturer Plug and Play ID.

DeviceProductInfo.Builder setModelYear(int modelYear)

Sets the model year of the device.

DeviceProductInfo.Builder setName(String name)

Sets the display name.

DeviceProductInfo.Builder setProductId(String productId)

Sets the product ID.

DeviceProductInfo.Builder setVideoInputType(int videoInputType)

Sets the video input type of the device.

Inherited methods

Public constructors

Builder

public Builder (String manufacturerPnpId, 
                String productId)

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

public DeviceProductInfo build ()

Builds a new DeviceProductInfo instance.

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

setConnectionToSinkType

public DeviceProductInfo.Builder setConnectionToSinkType (int connectionToSinkType)

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

Parameters
connectionToSinkType int: The connection type.
Value is one of the following:
Returns
DeviceProductInfo.Builder This builder.
This value cannot be null.

setEdidStructureMetadata

public DeviceProductInfo.Builder setEdidStructureMetadata (int edidStructureVersion, 
                int edidStructureRevision)

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

Returns
DeviceProductInfo.Builder This builder.

setManufactureDate

public DeviceProductInfo.Builder setManufactureDate (int manufactureWeek, 
                int manufactureYear)

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

Returns
DeviceProductInfo.Builder This value cannot be null.

setManufacturerPnpId

public DeviceProductInfo.Builder setManufacturerPnpId (String manufacturerPnpId)

Sets the Manufacturer Plug and Play ID.

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

Returns
DeviceProductInfo.Builder This builder.
This value cannot be null.

setModelYear

public DeviceProductInfo.Builder setModelYear (int modelYear)

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

Returns
DeviceProductInfo.Builder This builder.
This value cannot be null.

setName

public DeviceProductInfo.Builder setName (String name)

Sets the display name.

Parameters
name String: The display name.
This value may be null.

Returns
DeviceProductInfo.Builder This builder.
This value cannot be null.

setProductId

public DeviceProductInfo.Builder setProductId (String productId)

Sets the product ID.

Parameters
productId String: The product ID.
This value cannot be null.

Returns
DeviceProductInfo.Builder This builder.
This value cannot be null.

setVideoInputType

public DeviceProductInfo.Builder setVideoInputType (int videoInputType)

Sets the video input type of the device.

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