am 0cb3f587: am 0d72f7e9: Fix a race condition that could result in the screen being forced off indefinitely after a phone call.
Merge commit '0cb3f58741efa2b2b7477cbae973a29e614c62e8' into eclair-mr2-plus-aosp * commit '0cb3f58741efa2b2b7477cbae973a29e614c62e8': Fix a race condition that could result in the screen being forced off indefinitely after a phone call.
This commit is contained in:
@@ -2349,11 +2349,9 @@ class PowerManagerService extends IPowerManager.Stub
|
|||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(identity);
|
Binder.restoreCallingIdentity(identity);
|
||||||
}
|
}
|
||||||
synchronized (mLocks) {
|
if (mProximitySensorActive) {
|
||||||
if (mProximitySensorActive) {
|
mProximitySensorActive = false;
|
||||||
mProximitySensorActive = false;
|
forceUserActivityLocked();
|
||||||
forceUserActivityLocked();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2361,6 +2359,10 @@ class PowerManagerService extends IPowerManager.Stub
|
|||||||
if (mSpew) {
|
if (mSpew) {
|
||||||
Log.d(TAG, "proximityChangedLocked, active: " + active);
|
Log.d(TAG, "proximityChangedLocked, active: " + active);
|
||||||
}
|
}
|
||||||
|
if (mProximityCount <= 0) {
|
||||||
|
Log.d(TAG, "Ignoring proximity change after last proximity lock is released");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (active) {
|
if (active) {
|
||||||
goToSleepLocked(SystemClock.uptimeMillis());
|
goToSleepLocked(SystemClock.uptimeMillis());
|
||||||
mProximitySensorActive = true;
|
mProximitySensorActive = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user