summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2013-09-10 18:45:25 -0700
committerJeff Brown <jeffbrown@google.com>2013-09-10 18:45:25 -0700
commit6eade79f90b5a592c16a6a5fb0a4b409dc3848e6 (patch)
tree36b9b8faf1fc27a1634a5298cf1aa9af51df2ff4 /services
parent20e287534396655af0d5912d8b272070ad24a93a (diff)
downloadframeworks_base-6eade79f90b5a592c16a6a5fb0a4b409dc3848e6.zip
frameworks_base-6eade79f90b5a592c16a6a5fb0a4b409dc3848e6.tar.gz
frameworks_base-6eade79f90b5a592c16a6a5fb0a4b409dc3848e6.tar.bz2
Ignore ON_AFTER_RELEASE for partial wake locks.
This is a regression in the new power manager. Apparently some apps try to use ON_AFTER_RELEASE with partial wake locks which doesn't make sense. Ignore the flag just like we used to prior to JB MR1. Bug: 10336375 Change-Id: Ib307eb60201612ba9bb03dc4da3365aba0b4848d
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/power/PowerManagerService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/java/com/android/server/power/PowerManagerService.java b/services/java/com/android/server/power/PowerManagerService.java
index 777ffe7..2167f67 100644
--- a/services/java/com/android/server/power/PowerManagerService.java
+++ b/services/java/com/android/server/power/PowerManagerService.java
@@ -650,8 +650,8 @@ public final class PowerManagerService extends IPowerManager.Stub
}
private void applyWakeLockFlagsOnAcquireLocked(WakeLock wakeLock) {
- if ((wakeLock.mFlags & PowerManager.ACQUIRE_CAUSES_WAKEUP) != 0 &&
- isScreenLock(wakeLock)) {
+ if ((wakeLock.mFlags & PowerManager.ACQUIRE_CAUSES_WAKEUP) != 0
+ && isScreenLock(wakeLock)) {
wakeUpNoUpdateLocked(SystemClock.uptimeMillis());
}
}
@@ -725,7 +725,8 @@ public final class PowerManagerService extends IPowerManager.Stub
}
private void applyWakeLockFlagsOnReleaseLocked(WakeLock wakeLock) {
- if ((wakeLock.mFlags & PowerManager.ON_AFTER_RELEASE) != 0) {
+ if ((wakeLock.mFlags & PowerManager.ON_AFTER_RELEASE) != 0
+ && isScreenLock(wakeLock)) {
userActivityNoUpdateLocked(SystemClock.uptimeMillis(),
PowerManager.USER_ACTIVITY_EVENT_OTHER,
PowerManager.USER_ACTIVITY_FLAG_NO_CHANGE_LIGHTS,