AmbientBacklightMetadata
class AmbientBacklightMetadata : Parcelable
| kotlin.Any | |
| ↳ | android.media.quality.AmbientBacklightMetadata | 
Metadata of ambient backlight.
A metadata instance is sent from ambient backlight hardware in a AmbientBacklightEvent with AmbientBacklightEvent.AMBIENT_BACKLIGHT_EVENT_METADATA_AVAILABLE.
Summary
| Constants | |
|---|---|
| static Int | The compress algorithm is disabled. | 
| static Int | The compress algorithm is run length encoding (RLE). | 
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
| AmbientBacklightMetadata(packageName: String, compressAlgorithm: Int, source: Int, colorFormat: Int, horizontalZonesNumber: Int, verticalZonesNumber: Int, zonesColors: IntArray)Constructs AmbientBacklightMetadata. | |
| Public methods | |
|---|---|
| Int | |
| Int | Gets color format. | 
| Int | Gets compress algorithm. | 
| Int | Gets the number of horizontal color zones. | 
| String | Gets package name of the metadata. | 
| Int | Gets source of ambient backlight detection. | 
| Int | Gets the number of vertical color zones. | 
| IntArray | Gets color data of all available color zones. | 
| String | toString() | 
| Unit | writeToParcel(dest: Parcel, flags: Int) | 
| Properties | |
|---|---|
| static Parcelable.Creator<AmbientBacklightMetadata!> | |
Constants
ALGORITHM_NONE
static val ALGORITHM_NONE: Int
The compress algorithm is disabled.
Value: 0ALGORITHM_RLE
static val ALGORITHM_RLE: Int
The compress algorithm is run length encoding (RLE).
Value: 1Public constructors
AmbientBacklightMetadata
AmbientBacklightMetadata(
packageName: String,
compressAlgorithm: Int,
source: Int,
colorFormat: Int,
horizontalZonesNumber: Int,
verticalZonesNumber: Int,
zonesColors: IntArray)
Constructs AmbientBacklightMetadata.
Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
| Int | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0orandroid.os.Parcelable#CONTENTS_FILE_DESCRIPTOR | 
getColorFormat
fun getColorFormat(): Int
Gets color format.
| Return | |
|---|---|
| Int | Value is android.graphics.PixelFormat#RGBA_8888,android.graphics.PixelFormat#RGBX_8888,android.graphics.PixelFormat#RGBA_F16,android.graphics.PixelFormat#RGBA_1010102,android.graphics.PixelFormat#RGB_888,android.graphics.PixelFormat#RGB_565, or android.graphics.PixelFormat.R_8 | 
getCompressionAlgorithm
fun getCompressionAlgorithm(): Int
Gets compress algorithm.
| Return | |
|---|---|
| Int | Value is android.media.quality.AmbientBacklightMetadata#ALGORITHM_NONE, orandroid.media.quality.AmbientBacklightMetadata#ALGORITHM_RLE | 
getHorizontalZonesCount
fun getHorizontalZonesCount(): Int
Gets the number of horizontal color zones.
A color zone is represented by one single aggregated color. The number should not be larger than 128.
| Return | |
|---|---|
| Int | Value is between 0 and 128 inclusive | 
getPackageName
fun getPackageName(): String
Gets package name of the metadata.
getSource
fun getSource(): Int
Gets source of ambient backlight detection.
getVerticalZonesCount
fun getVerticalZonesCount(): Int
Gets the number of vertical color zones.
A color zone is represented by one single aggregated color. The number should not be larger than 80.
| Return | |
|---|---|
| Int | Value is between 0 and 80 inclusive | 
getZoneColors
fun getZoneColors(): IntArray
Gets color data of all available color zones.
The format of the color data can be found at getColorFormat().
| Return | |
|---|---|
| IntArray | an array of color data, in row by row (left-to-right then top-to-bottom) order of the color zones. | 
toString
fun toString(): String
| Return | |
|---|---|
| String | a string representation of the object. | 
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
| Parameters | |
|---|---|
| dest | Parcel: The Parcel in which the object should be written. This value cannot be null. | 
| flags | Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either0or a combination ofandroid.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
