Interface IDisplayManager2
interface IDisplayManager2
Extends IDisplayManager
Version 2 of [IDisplayManager]
Methods
commitStates()
i32 commitStates()
Request the display manager to commit all pending states. Please note, [IDisplayManager2#commitStates]
has to be called for any changes (made via [IDisplayManager]) to be applied. IDisplayManager state changing
API will only update the pending states and [IDisplayManager2#commitStates] will actually try to apply
all the pending states change requests made since last commitStates() call. The benefit of having a single
commit call is that fact that clients can apply multiple dependent states together on display hardware.
Client can know the result of the commit request through [IDisplayManagerListener#onCommitSuccess] or
[IDisplayManagerListener#onCommitFailure].
This API requires the client to have com.amazon.graphics.privilege.display.manager application privilege.
Returns
i32
a commit ID for this commitStates request.
Throws
DeviceError— if the display device is not in active stateSecurityError— if client doesn’t have the required set of application privileges [IDisplayManager]
addDisplayManagerListener()
Add IDisplayManagerListener. The listener will continue to receive events until [ISubscription#unsubscribe] is called or until the event source is destroyed.com.amazon.apmf.ISubscription*addDisplayManagerListener(IDisplayManagerListener*listener)
Parameters
listener
IDisplayManagerListener* — Required
[IDisplayManagerListener] interface
Returns
com.amazon.apmf.ISubscription*
ISubscription related to this listener interface
Throws
NullPointerError— if any input argument is null pointer while a non-null one is expectedDeviceError— if the display device is not in active stateOutOfMemoryError— if device is out of memory [IDisplayListener]

