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:
committed by
Jean-Baptiste Queru
parent
93a8225e54
commit
c362f0cd50
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user