summaryrefslogtreecommitdiff
path: root/sensors/1.0/default/service.cpp
diff options
context:
space:
mode:
authorAshutosh Joshi <ashutoshj@google.com>2017-02-13 12:52:14 -0800
committerAshutosh Joshi <ashutoshj@google.com>2017-02-14 11:36:40 -0800
commitda270a09f46d300474c8fc47badb8f148dc614f9 (patch)
tree25f91eb7959f13545fe31e64827e4a5740396f1f /sensors/1.0/default/service.cpp
parentf008f8fdc436b9638001c0f7100999c7cbc25268 (diff)
Fix shim layer bugs for Sensors HIDL wrapper.
i) Increase the number of default threads to 2. ii) Handle the flush complete event correctly. Bug: 35189074 Bug: 35067266 Test: Test that sensors work in both binderized and passthrough modes. Ensure that camera photosphere works. Change-Id: Ic8dadf03395b4e96092ae962cf790c93d65a1c8d
Diffstat (limited to 'sensors/1.0/default/service.cpp')
-rw-r--r--sensors/1.0/default/service.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/sensors/1.0/default/service.cpp b/sensors/1.0/default/service.cpp
index 5bcfe4b1f8..65f6d816a1 100644
--- a/sensors/1.0/default/service.cpp
+++ b/sensors/1.0/default/service.cpp
@@ -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);
}