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

Commit 0cb3f587 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android Git Automerger
Browse files

am 0d72f7e9: Fix a race condition that could result in the screen being forced...

am 0d72f7e9: Fix a race condition that could result in the screen being forced off indefinitely after a phone call.

Merge commit '0d72f7e9' into eclair-mr2

* commit '0d72f7e9':
  Fix a race condition that could result in the screen being forced off indefinitely after a phone call.
parents 9e63ce81 0d72f7e9
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -2349,18 +2349,20 @@ class PowerManagerService extends IPowerManager.Stub
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
        synchronized (mLocks) {
        if (mProximitySensorActive) {
            mProximitySensorActive = false;
            forceUserActivityLocked();
        }
    }
    }

    private void proximityChangedLocked(boolean active) {
        if (mSpew) {
            Log.d(TAG, "proximityChangedLocked, active: " + active);
        }
        if (mProximityCount <= 0) {
            Log.d(TAG, "Ignoring proximity change after last proximity lock is released");
            return;
        }
        if (active) {
            goToSleepLocked(SystemClock.uptimeMillis());
            mProximitySensorActive = true;