Skip to content

Commit

Permalink
SystemUI: Fix Wakelock issue
Browse files Browse the repository at this point in the history
Prevent SystemUI crash due to "WakeLock under-locked Doze" (issue #12) by only releasing a wakelock that was not already released

Signed-off-by: Pranav Vashi <[email protected]>
Signed-off-by: Joey Huab <[email protected]>
  • Loading branch information
ponces authored and eldainosor committed Jun 9, 2021
1 parent 6ab64be commit cd6110b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ public void release(String why) {
} else {
mActiveClients.put(why, count - 1);
}
inner.release();
if (inner.isHeld()) {
inner.release();
}
}

/** @see PowerManager.WakeLock#wrap(Runnable) */
Expand Down

0 comments on commit cd6110b

Please sign in to comment.