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
This commit is contained in:
Masanori Ogino
2012-03-07 16:25:16 +09:00
committed by Jean-Baptiste Queru
parent 93a8225e54
commit c362f0cd50

View File

@@ -1083,9 +1083,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
try {
int sw = mWindowManager.getSwitchState(SW_LID);
if (sw > 0) {
mLidOpen = LID_OPEN;
} else if (sw == 0) {
mLidOpen = LID_CLOSED;
} else if (sw == 0) {
mLidOpen = LID_OPEN;
} else {
mLidOpen = LID_ABSENT;
}