Do not use SensorDevice as ISensorsCallback
If the SensorDevice implements the ISensorsCallback, then when the
last client disconnects (e.g. the Sensors HAL crashes), the Binder
framework will release the server implementation, causing the
SensorDevice to be destructed. A separate object must be used so that
the SensorDevice is not destroyed whenever the Sensors HAL
disconnects.
Bug: 111070257
Test: Builds, verifies SensorDevice is not destroyed when Sensors HAL
crashes
Change-Id: I11b7946a24e8ef8dff30b35ca44ccb5be56035ba
2 files changed