Skip to content

Commit c362f0c

Browse files
aiot-oginoJean-Baptiste Queru
authored andcommitted
Lid switch state is incorrect
InputManager#getSwitchState() returns AKEY_STATE_UP(0=OPEN) and AKEY_STATE_DOWN(1=CLOSE). mLidOpen is opposite from a real lid status. Change-Id: I40aa4e0defb95d82b6144ff6b7514f721bf9030f
1 parent 93a8225 commit c362f0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,9 +1083,9 @@ void readLidState() {
10831083
try {
10841084
int sw = mWindowManager.getSwitchState(SW_LID);
10851085
if (sw > 0) {
1086-
mLidOpen = LID_OPEN;
1087-
} else if (sw == 0) {
10881086
mLidOpen = LID_CLOSED;
1087+
} else if (sw == 0) {
1088+
mLidOpen = LID_OPEN;
10891089
} else {
10901090
mLidOpen = LID_ABSENT;
10911091
}

0 commit comments

Comments
 (0)