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

Commit 84f85dc7 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Fix keyguard wake-up issue."

parents 827c1823 ff1baef8
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.