Skip to content

Commit c479b55

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Check proximity detector before powering off." into jb-mr1-dev
2 parents 7af0c16 + 4ccbdd1 commit c479b55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/java/com/android/server/power/PowerManagerService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,8 @@ private boolean updateWakefulnessLocked(int dirty) {
11361136
private boolean isItBedTimeYetLocked() {
11371137
return mBootCompleted && !mStayOn
11381138
&& (mWakeLockSummary
1139-
& (WAKE_LOCK_SCREEN_BRIGHT | WAKE_LOCK_SCREEN_DIM)) == 0
1139+
& (WAKE_LOCK_SCREEN_BRIGHT | WAKE_LOCK_SCREEN_DIM
1140+
| WAKE_LOCK_PROXIMITY_SCREEN_OFF)) == 0
11401141
&& (mUserActivitySummary
11411142
& (USER_ACTIVITY_SCREEN_BRIGHT | USER_ACTIVITY_SCREEN_DIM)) == 0;
11421143
}

0 commit comments

Comments
 (0)