Interface IDisplayManager
interface IDisplayManager
Extends com.amazon.apmf.IStandard
Display manager interface to set various states and configurations of a display. Clients can call
IStandard::tryQueryInterface on IDisplay object to get IDisplayManager interface on any IDisplay object.
[IDisplayController#getDisplayList] [IDisplayController#getPrimaryDisplay] [IDisplayManager2#commitStates]
Methods
requestConfigChange()
Request the display to switch to a new config. IDisplayListener.onConfigChange will be called upon successful completion. Calling requestConfigChange() would implicitly disable auto config switch. This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege.voidrequestConfigChange(IDisplayConfig*displayConfig,i32refreshRateInMillihertz)
Parameters
displayConfig
IDisplayConfig* — Required
The new requested display config. Should be one of the config returned in
getAllSupportedConfigs(). Refresh rate must be one of the supported refresh rates in mHz (millihertz)
for this config. Please see IDisplayConfig#getSupportedRefreshRatesInMillihertz().
refreshRateInMillihertz
i32 — Required
Requested refresh rate of the config
Throws
NullPointerError— if any input argument is null pointer while a non-null one is expectedInvalidArgumentError— if any input argument is invalidDeviceError— if the display device is not in active stateTimeoutError— if request timed outSecurityError— if client doesn’t have the required set of application privileges [IDisplayConfig] [IDisplayListener] [IDisplay#addDisplayListener] [IDisplayManager#enableAutoConfigSwitch]
enableAutoConfigSwitch()
Request the display to switch to a new config automatically. In this mode, display server selects the most appropriate config dynamically based on various factors. IDisplayListener.onConfigChange will still be called upon a successful config switch. Please note, calling enableAutoConfigSwitch(true) would override previous requestConfigChange() call. The default state is “true”. This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege.voidenableAutoConfigSwitch(boolenable)
Parameters
enable
bool — Required
If true, display subsystem would choose appropriate config automatically.
Throws
DeviceError— if the display device is not in active stateTimeoutError— if request timed outSecurityError— if client doesn’t have the required set of application privileges [IDisplayConfig] [IDisplayListener] [IDisplay#addDisplayListener] [IDisplayManager#requestConfigChange]
enableMultipleRefreshRate()
Set the Multiple Refresh Rate (MRR) state for this display. MRR is a feature which allows clients to request alternate refresh rate which might be more appropriate for their content. This is a global MRR state for a display and controls if applications can request display server to switch to one of the other supported refresh rates which closely matches original content frame rate. If state is ‘true’, display subsystem (DS) is allowed to switch to one of the alternate refresh rates based on requests from apps via ISurfaceControl#setPreferredRefreshRateInMillihertz to match content frame rate. ISurfaceControl#setPreferredRefreshRateInMillihertz() will have no effect If state is set as ‘false’. The default state is “true”. This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege.voidenableMultipleRefreshRate(boolenable)
Parameters
enable
bool — Required
MRR state being requested to be used for this display
Throws
DeviceError— if the display device is not in active stateSecurityError— if client doesn’t have the required set of application privileges [IDisplayListener#onMultipleRefreshRateStateChange], [IDisplay#isMultipleRefreshRateEnabled] and [ISurfaceControl#setPreferredRefreshRateInMillihertz]
setLowLatencyModeState()
Set the LLM (Low Latency Mode) state of the display. This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. The default state is “true”. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege. Please see [IDisplayListener#onLowLatencyModeStateChange]voidsetLowLatencyModeState(LlmStatestate)
Parameters
state
LlmState — Required
LLM state being requested to be used for this display.
Throws
DeviceError— if the display device is not in active state.SecurityError— if client doesn’t have the required set of application privileges [LlmState]
setColorDepth()
Requests the display server to switch to the supplied color depth. This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege. Please see [IDisplayListener#onColorDepthChange]voidsetColorDepth(ColorDepthcolorDepth)
Parameters
colorDepth
ColorDepth — Required
Requested new color depth.
Throws
InvalidArgumentError— if any input argument is invalidDeviceError— if the display device is not in active stateTimeoutError— if request timed outSecurityError— if client doesn’t have the required set of application privileges [ColorDepth]
setColorSpace()
Requests display server to switch to the supplied color space e.g. RGB or YUV etc. This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege. Please see [IDisplayListener#onColorSpaceChange]voidsetColorSpace(ColorSpacecolorSpace)
Parameters
colorSpace
ColorSpace — Required
Requested new color space.
Throws
InvalidArgumentError— if any input argument is invalidDeviceError— if the display device is not in active stateTimeoutError— if request timed outSecurityError— if client doesn’t have the required set of application privileges [ColorSpace]
setPowerState()
Requests display server to switch to the supplied power state i.e active or sleep This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege. Please see [IPowerStateListener]voidsetPowerState(PowerStatepowerState)
Parameters
powerState
PowerState — Required
Requested new power state.
Throws
InvalidArgumentError— if any input argument is invalidDeviceError— if the display device is not in active stateTimeoutError— if request timed outSecurityError— if client doesn’t have the required set of application privileges [PowerState]
setHdrMode()
Requests display server to switch to the supplied display HDR mode. This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege. Please see [IDisplayListener#onHdrModeChange]voidsetHdrMode(HdrModemode)
Parameters
mode
HdrMode — Required
Requested new HDR mode
setOverscanBorder()
Requests display server to adjust the visible area of the display to ensure content is not lost beyond the screen’s physical borders. The API takes the widths of the four borders or margins as a percentage of width or height. This only updates pending state and must call [IDisplayManager2#commitStates] for this to take effect. This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege.voidsetOverscanBorder(doubleleftBorderAsPercentageOfWidth,doubletopBorderAsPercentageOfHeight,doublerightBorderAsPercentageOfWidth,doublebottomBorderAsPercentageOfHeight)
Parameters
leftBorderAsPercentageOfWidth
double — Required
The left border as percentage of width.
topBorderAsPercentageOfHeight
double — Required
The top border as percentage of height.
rightBorderAsPercentageOfWidth
double — Required
The right border as percentage of width.
bottomBorderAsPercentageOfHeight
double — Required
The bottom border as percentage of height.
Throws
InvalidArgumentError— if any input argument is invalidDeviceError— if the display device is not in active stateTimeoutError— if request timed outSecurityError— if client doesn’t have the required set of application privileges

