Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hybris-adaptors] Select 1st sensor variant for each sensor type. JB#…
…39550 The advent of virtual sensor variants means it is likely that several sensors are listed by android hal for each sensor type. Looks like at least Sony Xperia X lists primary sensors (that have wakeup capabilities like we expect) before secondary sensors. As sensorfwd uses the last entry listed for each sensor type, it means we get inverse wakeup from suspend behavior from what we want: The proximity sensor does not wake up the device, but something like ambient light sensor would - if it were left active in suspend. Probably this sensor selection should mimic what android java side does when choosing default sensor for type, but that has dependencies to sensors api versions etc. Choose the 1st sensor listed for each type in assumption that it will be the best fit for our purposes in case of having several virtual sensor variants. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
- Loading branch information