Fix double release of ScopedWakelock
Today, when a ScopedWakelock is moved, the default move constructor doesn't unlock the old wakelock instance. This results in the moved ScopedWakelock instance decrementing the wakelock ref count which leaves the multi-HAL out of sync from the sensor service. Fix this by adding a custom move constructor / operator to ensure old state is cleared on the moved instance. Bug: 163468874 Test: Load multi-HAL and verify that it properly waits to release the wakelock until the sensor service notifies that it has a lock held. Test: Run unit tests Change-Id: Ifd5a3c7596f78d7a756c4472f30efb625d670791
Loading
Please register or sign in to comment