Sensors HAL porting issue

77 views
Skip to first unread message

Chih-Wei Huang

unread,
Jan 29, 2018, 12:41:37 PM1/29/18
to android-porting
Hi,
I'm not sure if this is the right forum to ask sensors porting issue.
If not, please direct me to the right forum.

I'm trying to update my sensors HAL to
SENSORS_DEVICE_API_VERSION_1_3
according to https://source.android.com/devices/sensors/versioning
In particular, I added batch function and removed the setDelay according to

"Implement the batch function

Even if you do not implement batching (your hardware has no FIFO), you must implement the batch function. batch is used to set the sampling period and the maximum reporting latency for a given sensor. It replaces setDelay. setDelay will not be called anymore."


However, on an Android 7.1 device the sytem_server crashes in libsensorservice.so.
According to the analyzing of addr2line, it crashes at calling setDelay function
(from SensorService::setEventRate()).

I can't believe it because the document explicitly says "setDelay will not be called anymore."

So the document is wrong? If so, please correct it. Thank you!
Reply all
Reply to author
Forward
0 new messages