Added in API level 36

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

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

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

Returns a string representation of the object.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<AmbientBacklightMetadata!>

Constants

ALGORITHM_NONE

Added in API level 36
static val ALGORITHM_NONE: Int

The compress algorithm is disabled.

Value: 0

ALGORITHM_RLE

Added in API level 36
static val ALGORITHM_RLE: Int

The compress algorithm is run length encoding (RLE).

Value: 1

Public constructors

AmbientBacklightMetadata

Added in API level 36
AmbientBacklightMetadata(
    packageName: String,
    compressAlgorithm: Int,
    source: Int,
    colorFormat: Int,
    horizontalZonesNumber: Int,
    verticalZonesNumber: Int,
    zonesColors: IntArray)

Constructs AmbientBacklightMetadata.

Parameters
compressAlgorithm Int: Value is one of the following:
source Int: Value is one of the following:
colorFormat Int: Value is one of the following:

Public methods

describeContents

Added in API level 36
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

getCompressionAlgorithm

Added in API level 36
fun getCompressionAlgorithm(): Int

Gets compress algorithm.

Return
Int Value is one of the following:

getHorizontalZonesCount

Added in API level 36
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

Added in API level 36
fun getPackageName(): String

Gets package name of the metadata.

getVerticalZonesCount

Added in API level 36
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

Added in API level 36
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

Added in API level 36
fun toString(): String

Returns a string representation of the object.

Return
String a string representation of the object.

writeToParcel

Added in API level 36
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

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 either 0 or a combination of the following:

Properties

CREATOR

Added in API level 36
static val CREATOR: Parcelable.Creator<AmbientBacklightMetadata!>