History log of /frameworks/native/services/sensorservice/SensorDeviceUtils.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a53e89d23480db1bcc166afd0179ee4856cd38b5 03-Nov-2017 Yifan Hong <elsk@google.com> SensorDeviceUtils: do not create sp(this) in constructor.

This may cause refcount problems as stated in RefBase
document. Do this in HidlServiceRegistrationWaiter::onFirstRef
instead.

Test: boots multiple times
Bug: 68765551
Change-Id: Iae2589f7e003cb8d44fe6ca43f1342b89125f763
/frameworks/native/services/sensorservice/SensorDeviceUtils.cpp
b41e87ae680beefd0d39a127d1ea0b2614caa5f9 02-Nov-2017 Martijn Coenen <maco@google.com> SensorService: fix potential mutex use-before-init.

Since mRegistered is declared before mLock, it's possible to
receive a service notification callback on a binder thread
before mLock has been initialized. Prevent this by registering
in the constructor body, when we are guaranteed that the mutex
has been initialized.

Bug: 68765551
Test: many reboots on sailfish
Change-Id: I7beedc72be2a4aae961c546402f7016eacaeb3c0
/frameworks/native/services/sensorservice/SensorDeviceUtils.cpp
1a00e2d5fb819c95ade644146020c83551208af1 28-Sep-2017 Peng Xu <pengxu@google.com> Clean up connection to sensor hidl service

getService() would block until hidl service up and running. Replace
retry delay with service registration listener to speed up.

Moreover, when getService() return nullptr, it means sensor hidl
service does not exist. Remove retry in this case and return failure.

Bug: 66916774
Test: test device boot
Test: adb shell "stop; start"
Test: kill sensor hidl process
Test: mod manifest file to remove sensor entry
Change-Id: I685971425e97e314699de4630d9adf400aba4af2
/frameworks/native/services/sensorservice/SensorDeviceUtils.cpp