Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 55a4f59f authored by Anthony Stange's avatar Anthony Stange
Browse files

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
parent d8f664a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment