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

Skip to content
Commit 6958b021 authored by Ytai Ben-Tsvi's avatar Ytai Ben-Tsvi Committed by Ytai Ben-tsvi
Browse files

Fix race condition resulting in unbalanced wakelock calls

Because we release the lock during threadLoop(), we might actually
make the queue empty more than once during a cycle, but only release
the wakelock once in the end.

This change makes sure we release once for every time we make the
queue empty, just like we acquire once for every time we make it non-
empty.

Test: No good way to repro. Will submit and wait for the power monitor
      results.
Bug: 228012293
Change-Id: I740b438dbddb6aace41263427bde95f902ed25a0
parent 83302867
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