diff options
author | Anthony Stange <stange@google.com> | 2020-08-11 12:46:31 -0400 |
---|---|---|
committer | Daniel Norman <danielnorman@google.com> | 2020-09-02 14:02:47 -0700 |
commit | 99d70e4e3e1779394e9ec5e5dba0b1f5a0dc891f (patch) | |
tree | 60e48851f16840ceb9d842046d3e49d37d7ddc58 /camera/common/1.0/default/CameraModule.cpp | |
parent | 7dbc39456c3b34e25b0a3caaf0c44b5cb842d82f (diff) |
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
(cherry picked from commit 55a4f59fb8ca7fb83b3ca14d560c30e2c5239a16)
Diffstat (limited to 'camera/common/1.0/default/CameraModule.cpp')
0 files changed, 0 insertions, 0 deletions