Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02e164d9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update documentation for initialize()"

parents 08004dfb 6e4a2206
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -77,11 +77,20 @@ interface ISensors {
     * framework. The Event FMQ is created using the eventQueueDescriptor.
     * Data may only be written to the Event FMQ. Data must not be read from
     * the Event FMQ since the framework is the only reader. Upon receiving
     * sensor events, the HAL should write the sensor events to the Event FMQ.
     * sensor events, the HAL writes the sensor events to the Event FMQ.
     *
     * Once the HAL is finished writing sensor events to the Event FMQ, the HAL
     * must call the Event FMQ's EventFlag wake() function with the
     * EventQueueFlagBits::READ_AND_PROCESS mask which notifies the framework
     * that sensor events are available to be read and processed.
     * must notify the framework that sensor events are available to be read and
     * processed. This is accomplished by either:
     *     1) Calling the Event FMQ’s EventFlag::wake() function with
              EventQueueFlagBits::READ_AND_PROCESS
     *     2) Setting the write notification in the Event FMQ’s writeBlocking()
     *        function to EventQueueFlagBits::READ_AND_PROCESS.
     *
     * If the Event FMQ’s writeBlocking() function is used, the read
     * notification must be set to EventQueueFlagBits::EVENTS_READ in order to
     * be notified and unblocked when the framework has successfully read events
     * from the Event FMQ.
     *
     * The Wake Lock FMQ is used by the framework to notify the HAL when it is
     * safe to release its wake_lock. When the framework receives WAKE_UP events
@@ -110,6 +119,10 @@ interface ISensors {
     * any outstanding wake_locks held as a result of WAKE_UP events should be
     * released.
     *
     * All active sensor requests and direct channels must be closed and
     * properly cleaned up when initialize is called in order to ensure that the
     * HAL and framework's state is consistent (e.g. after a runtime restart).
     *
     * initialize must be thread safe and prevent concurrent calls
     * to initialize from simultaneously modifying state.
     *