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

Commit ff1baef8 authored by Jeff Brown's avatar Jeff Brown
Browse files

Fix keyguard wake-up issue.

Bug: 6835809
Change-Id: I7a23b50286592b4c4b104b0b6429f2d05fb5e01b
parent 1825b984
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -542,8 +542,13 @@ public final class PowerManager {

        private void acquireLocked() {
            if (!mRefCounted || mCount++ == 0) {
                // Do this even if the wake lock is already thought to be held (mHeld == true)
                // because non-reference counted wake locks are not always properly released.
                // For example, the keyguard's wake lock might be forcibly released by the
                // power manager without the keyguard knowing.  A subsequent call to acquire
                // should immediately acquire the wake lock once again despite never having
                // been explicitly released by the keyguard.
                mHandler.removeCallbacks(mReleaser);
                if (!mHeld) {
                try {
                    mService.acquireWakeLock(mFlags, mToken, mTag, mWorkSource);
                } catch (RemoteException e) {
@@ -551,7 +556,6 @@ public final class PowerManager {
                mHeld = true;
            }
        }
        }

        /**
         * Releases the wake lock.