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

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

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.

Returns
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

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.

Returns
int Value is SOURCE_NONE, SOURCE_AUDIO, SOURCE_VIDEO, or SOURCE_AUDIO_VIDEO

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