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

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

Unit
writeToParcel(dest: Parcel, flags: Int)

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 android.media.quality.AmbientBacklightMetadata#ALGORITHM_NONE, or android.media.quality.AmbientBacklightMetadata#ALGORITHM_RLE
source Int: Value is android.media.quality.AmbientBacklightSettings#SOURCE_NONE, android.media.quality.AmbientBacklightSettings#SOURCE_AUDIO, android.media.quality.AmbientBacklightSettings#SOURCE_VIDEO, or android.media.quality.AmbientBacklightSettings#SOURCE_AUDIO_VIDEO
colorFormat 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

Public methods

describeContents

Added in API level 36
fun describeContents(): Int
Return
Int 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

getCompressionAlgorithm

Added in API level 36
fun getCompressionAlgorithm(): Int

Gets compress algorithm.

Return
Int Value is android.media.quality.AmbientBacklightMetadata#ALGORITHM_NONE, or android.media.quality.AmbientBacklightMetadata#ALGORITHM_RLE

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
Return
String a string representation of the object.

writeToParcel

Added in API level 36
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 either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

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