AmbientBacklightSettings


public final class AmbientBacklightSettings
extends Object implements Parcelable

java.lang.Object
   ↳ android.media.quality.AmbientBacklightSettings


Settings to configure ambient backlight hardware.

Summary

Constants

int SOURCE_AUDIO

The detection is enabled for audio.

int SOURCE_AUDIO_VIDEO

The detection is enabled for audio and video.

int SOURCE_NONE

The detection is disabled.

int SOURCE_VIDEO

The detection is enabled for video.

Inherited constants

int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel(Parcel, int): the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)".

Fields

public static final Creator<AmbientBacklightSettings> CREATOR

Public constructors

AmbientBacklightSettings(int source, int maxFps, int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, boolean isLetterboxOmitted, int threshold)

Constructs AmbientBacklightSettings.

Public methods

int describeContents()

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

int getColorFormat()

Gets color format.

int getHorizontalZonesCount()

Gets the number of horizontal color zones.

int getMaxFps()

Gets max frames per second.

int getSource()

Gets source of ambient backlight detection.

int getThreshold()

Gets the detection threshold of the ambient light.

int getVerticalZonesCount()

Gets the number of vertical color zones.

boolean isLetterboxOmitted()

Returns true if the black portion of the screen in letter box mode is omitted; false otherwise.

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

abstract int describeContents()

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

abstract void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Constants

SOURCE_AUDIO

public static final int SOURCE_AUDIO

The detection is enabled for audio.

Constant Value: 1 (0x00000001)

SOURCE_AUDIO_VIDEO

public static final int SOURCE_AUDIO_VIDEO

The detection is enabled for audio and video.

Constant Value: 3 (0x00000003)

SOURCE_NONE

public static final int SOURCE_NONE

The detection is disabled.

Constant Value: 0 (0x00000000)

SOURCE_VIDEO

public static final int SOURCE_VIDEO

The detection is enabled for video.

Constant Value: 2 (0x00000002)

Fields

CREATOR

public static final Creator<AmbientBacklightSettings> CREATOR

Public constructors

AmbientBacklightSettings

public AmbientBacklightSettings (int source, 
                int maxFps, 
                int colorFormat, 
                int horizontalZonesNumber, 
                int verticalZonesNumber, 
                boolean isLetterboxOmitted, 
                int threshold)

Constructs AmbientBacklightSettings.

Parameters
source int: Value is SOURCE_NONE, SOURCE_AUDIO, SOURCE_VIDEO, or SOURCE_AUDIO_VIDEO

maxFps int

colorFormat int: Value is PixelFormat.RGBA_8888, PixelFormat.RGBX_8888, PixelFormat.RGBA_F16, PixelFormat.RGBA_1010102, PixelFormat.RGB_888, PixelFormat.RGB_565, or android.graphics.PixelFormat.R_8

horizontalZonesNumber int

verticalZonesNumber int

isLetterboxOmitted boolean

threshold int

Public methods

describeContents

public int describeContents ()

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.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

getColorFormat

public int getColorFormat ()

Gets color format.

getHorizontalZonesCount

public int getHorizontalZonesCount ()

Gets the number of horizontal color zones.

A color zone is a group of lights that always display the same color.

Returns
int Value is 0 or greater

getMaxFps

public int getMaxFps ()

Gets max frames per second.

Returns
int Value is 1 or greater

getSource

public int getSource ()

Gets source of ambient backlight detection.

getThreshold

public int getThreshold ()

Gets the detection threshold of the ambient light.

If the color of a color zone is changed but the difference is smaller than the threshold, the change is ignored.

Returns
int

getVerticalZonesCount

public int getVerticalZonesCount ()

Gets the number of vertical color zones.

A color zone is a group of lights that always display the same color.

Returns
int Value is 0 or greater

isLetterboxOmitted

public boolean isLetterboxOmitted ()

Returns true if the black portion of the screen in letter box mode is omitted; false otherwise.

Letter-box is a technique to keep the original aspect ratio when displayed on a screen with different aspect ratio. Black bars are added to the top and bottom.

Returns
boolean

toString

public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

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.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES