Package: android.frameworks.displayservice@1.0

IDisplayEventReceiver

interface IDisplayEventReceiver

Methods

init

init (IEventCallback callback)
generates (Status status)

Attach callback to start receiving events.Hotplug events are enabled by default.Vsync events must be enabled with setVsyncRate.

Details
Parameters
callback
Generates
status
Must be:SUCCESS if callback is initialized correctly.BAD_VALUE if callback is nullptr or if this has already been called.UNKNOWN if callback cannot be initialized.

setVsyncRate

setVsyncRate (int32_t count)
generates (Status status)

Must start(or stop)sending callbacks immediately as requested.

Details
Parameters
count
Request to be sent a callback for every<count>th event.If zero, then only send callbacks when requestNextVsync is called.By default, this will be zero.Must be >= 0.
Generates
status
Must be:SUCCESS if rate is set successfully.BAD_VALUE if count<0 or no init.UNKNOWN for all other errors.

requestNextVsync

requestNextVsync ()
generates (Status status)

Must have no effect if vsync rate(set with setVsyncRate)is 0.

Details
Generates
status
Must be:SUCCESS if request successfully processed.BAD_VALUE if no init.UNKNOWN for all other errors.

close

close ()
generates (Status status)

Server must drop all references to callback and stop sending events.Client must call this method if init was called.

Details
Generates
status
Must be:SUCCESS if request successfully processed.BAD_VALUE if init has not been called.UNKNOWN for all other errors.