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

Commit bac998a0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Prevent WakeLock count ending up in an incorrect state"

parents a4fabd3e 8d475ca0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1412,7 +1412,11 @@ public final class PowerManager {
         */
        public void release(int flags) {
            synchronized (mToken) {
                if (mInternalCount > 0) {
                    // internal count must only be decreased if it is > 0 or state of
                    // the WakeLock object is broken.
                    mInternalCount--;
                }
                if ((flags & RELEASE_FLAG_TIMEOUT) == 0) {
                    mExternalCount--;
                }