public class

LiveDisplayManager

extends Object
java.lang.Object
   ↳ lineageos.hardware.LiveDisplayManager

Class Overview

LiveDisplay is an advanced set of features for improving display quality under various ambient conditions. The backend service is constructed with a set of LiveDisplayFeatures which provide capabilities such as outdoor mode, night mode, and calibration. It interacts with LineageHardwareService to relay changes down to the lower layers. Multiple adaptive modes are supported, and various hardware features such as CABC, ACO and color enhancement are also managed by LiveDisplay.

Summary

Constants
int ADJUSTMENT_CONTRAST
int ADJUSTMENT_HUE
int ADJUSTMENT_INTENSITY
int ADJUSTMENT_SATURATION
int FEATURE_AUTO_CONTRAST Adjust images to increase contrast
int FEATURE_CABC Content adaptive backlight control, adjust images to increase brightness in order to reduce backlight level
int FEATURE_COLOR_ADJUSTMENT Capable of adjusting RGB levels
int FEATURE_COLOR_BALANCE System supports direct range-based control of display color balance (temperature).
int FEATURE_COLOR_ENHANCEMENT Adjust image to improve saturation and color
int FEATURE_DISPLAY_MODES System supports multiple display calibrations for different viewing intents.
int FEATURE_MANAGED_OUTDOOR_MODE System supports outdoor mode, but environmental sensing is done by an external application.
int FEATURE_PICTURE_ADJUSTMENT System supports manual hue/saturation/intensity/contrast adjustment of display.
int MODE_AUTO Enable automatic detection of appropriate mode
int MODE_DAY Change color temperature to day mode, and allow detection of outdoor conditions
int MODE_NIGHT Change color temperature to night mode
int MODE_OFF Disable all LiveDisplay adaptive features
int MODE_OUTDOOR Increase brightness/contrast/saturation for sunlight
Public Methods
float[] getColorAdjustment()
Gets the current RGB triplet which is applied as a color adjustment.
LiveDisplayConfig getConfig()
Gets the static configuration and settings.
int getDayColorTemperature()
Gets the user-specified color temperature to use in the daytime.
HSIC getDefaultPictureAdjustment()
Gets the default picture adjustment for the current display mode
synchronized static LiveDisplayManager getInstance(Context context)
Get or create an instance of the LiveDisplayManager
int getMode()
Returns the current adaptive mode.
int getNightColorTemperature()
Gets the user-specified color temperature to use at night.
HSIC getPictureAdjustment()
Gets the current picture adjustment settings (hue, saturation, intensity, contrast)
boolean isAutoContrastEnabled()
Checks if the auto contrast optimization feature is enabled.
boolean isAutomaticOutdoorModeEnabled()
Checks if outdoor mode should be enabled automatically when under extremely high ambient light.
boolean isCABCEnabled()
Checks if the CABC feature is enabled
boolean isColorEnhancementEnabled()
Checks if the color enhancement feature is enabled
boolean isNightModeEnabled()
Determine whether night mode is enabled (be it automatic or manual)
boolean setAutoContrastEnabled(boolean enabled)
Sets the state of auto contrast optimization
boolean setAutomaticOutdoorModeEnabled(boolean enabled)
Enables automatic detection of outdoor conditions.
boolean setCABCEnabled(boolean enabled)
Sets the state of CABC
boolean setColorAdjustment(float[] adj)
Sets the color adjustment to use.
boolean setColorEnhancementEnabled(boolean enabled)
Sets the state of color enhancement
boolean setDayColorTemperature(int temperature)
Sets the color temperature to use in the daytime.
boolean setMode(int mode)
Selects a new adaptive mode.
boolean setNightColorTemperature(int temperature)
Sets the color temperature to use at night.
boolean setPictureAdjustment(HSIC hsic)
Sets a new picture adjustment
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ADJUSTMENT_CONTRAST

added in API level 6

Constant Value: 3 (0x00000003)

public static final int ADJUSTMENT_HUE

added in API level 6

Constant Value: 0 (0x00000000)

public static final int ADJUSTMENT_INTENSITY

added in API level 6

Constant Value: 2 (0x00000002)

public static final int ADJUSTMENT_SATURATION

added in API level 6

Constant Value: 1 (0x00000001)

public static final int FEATURE_AUTO_CONTRAST

added in API level 6

Adjust images to increase contrast

Constant Value: 11 (0x0000000b)

public static final int FEATURE_CABC

added in API level 6

Content adaptive backlight control, adjust images to increase brightness in order to reduce backlight level

Constant Value: 10 (0x0000000a)

public static final int FEATURE_COLOR_ADJUSTMENT

added in API level 6

Capable of adjusting RGB levels

Constant Value: 13 (0x0000000d)

public static final int FEATURE_COLOR_BALANCE

added in API level 6

System supports direct range-based control of display color balance (temperature). This is preferred over simple RGB adjustment.

Constant Value: 16 (0x00000010)

public static final int FEATURE_COLOR_ENHANCEMENT

added in API level 6

Adjust image to improve saturation and color

Constant Value: 12 (0x0000000c)

public static final int FEATURE_DISPLAY_MODES

added in API level 6

System supports multiple display calibrations for different viewing intents.

Constant Value: 15 (0x0000000f)

public static final int FEATURE_MANAGED_OUTDOOR_MODE

added in API level 6

System supports outdoor mode, but environmental sensing is done by an external application.

Constant Value: 14 (0x0000000e)

public static final int FEATURE_PICTURE_ADJUSTMENT

added in API level 6

System supports manual hue/saturation/intensity/contrast adjustment of display.

Constant Value: 17 (0x00000011)

public static final int MODE_AUTO

added in API level 6

Enable automatic detection of appropriate mode

Constant Value: 2 (0x00000002)

public static final int MODE_DAY

added in API level 6

Change color temperature to day mode, and allow detection of outdoor conditions

Constant Value: 4 (0x00000004)

public static final int MODE_NIGHT

added in API level 6

Change color temperature to night mode

Constant Value: 1 (0x00000001)

public static final int MODE_OFF

added in API level 6

Disable all LiveDisplay adaptive features

Constant Value: 0 (0x00000000)

public static final int MODE_OUTDOOR

added in API level 6

Increase brightness/contrast/saturation for sunlight

Constant Value: 3 (0x00000003)

Public Methods

public float[] getColorAdjustment ()

added in API level 6

Gets the current RGB triplet which is applied as a color adjustment. The values are floats between 0 and 1. A setting of { 1.0, 1.0, 1.0 } means that no adjustment is made.

Returns
float[] array of { R, G, B } offsets

public LiveDisplayConfig getConfig ()

added in API level 6

Gets the static configuration and settings.

Returns
LiveDisplayConfig the configuration

public int getDayColorTemperature ()

added in API level 6

Gets the user-specified color temperature to use in the daytime.

Returns
int the day color temperature

public HSIC getDefaultPictureAdjustment ()

added in API level 6

Gets the default picture adjustment for the current display mode

Returns
HSIC HSIC object with default values

public static synchronized LiveDisplayManager getInstance (Context context)

added in API level 6

Get or create an instance of the LiveDisplayManager

Returns
LiveDisplayManager LiveDisplayManager

public int getMode ()

added in API level 6

Returns the current adaptive mode.

Returns
int id of the selected mode

public int getNightColorTemperature ()

added in API level 6

Gets the user-specified color temperature to use at night.

Returns
int the night color temperature

public HSIC getPictureAdjustment ()

added in API level 6

Gets the current picture adjustment settings (hue, saturation, intensity, contrast)

Returns
HSIC HSIC object with current settings

public boolean isAutoContrastEnabled ()

added in API level 6

Checks if the auto contrast optimization feature is enabled.

Returns
boolean true if enabled

public boolean isAutomaticOutdoorModeEnabled ()

added in API level 6

Checks if outdoor mode should be enabled automatically when under extremely high ambient light. This is typically around 12000 lux.

Returns
boolean if outdoor conditions should be detected

public boolean isCABCEnabled ()

added in API level 6

Checks if the CABC feature is enabled

Returns
boolean true if enabled

public boolean isColorEnhancementEnabled ()

added in API level 6

Checks if the color enhancement feature is enabled

Returns
boolean true if enabled

public boolean isNightModeEnabled ()

added in API level 9

Determine whether night mode is enabled (be it automatic or manual)

Returns
boolean

public boolean setAutoContrastEnabled (boolean enabled)

added in API level 6

Sets the state of auto contrast optimization

Returns
boolean true if state was changed

public boolean setAutomaticOutdoorModeEnabled (boolean enabled)

added in API level 6

Enables automatic detection of outdoor conditions. Outdoor mode is triggered when high ambient light is detected and it's not night.

Returns
boolean true if state was changed

public boolean setCABCEnabled (boolean enabled)

added in API level 6

Sets the state of CABC

Returns
boolean true if state was changed

public boolean setColorAdjustment (float[] adj)

added in API level 6

Sets the color adjustment to use. This can be set by the user to calibrate their screen. This should be sent in the format { R, G, B } as floats from 0 to 1. A setting of { 1.0, 1.0, 1.0 } means that no adjustment is made. The hardware implementation may refuse certain values which make the display unreadable, such as { 0, 0, 0 }. This calibration will be combined with other internal adjustments, such as night mode, if necessary.

Parameters
adj float
Returns
boolean true if state was changed

public boolean setColorEnhancementEnabled (boolean enabled)

added in API level 6

Sets the state of color enhancement

Returns
boolean true if state was changed

public boolean setDayColorTemperature (int temperature)

added in API level 6

Sets the color temperature to use in the daytime.

Returns
boolean true if state was changed

public boolean setMode (int mode)

added in API level 6

Selects a new adaptive mode.

Returns
boolean true if the mode was selected

public boolean setNightColorTemperature (int temperature)

added in API level 6

Sets the color temperature to use at night.

Returns
boolean true if state was changed

public boolean setPictureAdjustment (HSIC hsic)

added in API level 6

Sets a new picture adjustment

Returns
boolean true if success