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

Commit 0da2531b authored by Ashutosh Joshi's avatar Ashutosh Joshi
Browse files

Add a second thread for sensor service.

HIDL implementation defaults to using a single thread for a service.
This blocks on sensorservice poll. A minimum of two threads are needed
to allow for any meaningful control.

Bug: 35067266
Test: Verify sensors stream in both passthrough and binderized modes.
Change-Id: I44ccdb6db253ca9eb9903b51e05c1893945e297e
parent de85b24b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -23,5 +23,9 @@ using android::hardware::sensors::V1_0::ISensors;
using android::hardware::defaultPassthroughServiceImplementation;

int main() {
    return defaultPassthroughServiceImplementation<ISensors>();
    /* Sensors framework service needs at least two threads.
     * One thread blocks on a "poll"
     * The second thread is needed for all other HAL methods.
     */
    return defaultPassthroughServiceImplementation<ISensors>(2);
}