From c362f0cd507953baef9f295a514de0a58d5ccd31 Mon Sep 17 00:00:00 2001 From: Masanori Ogino Date: Wed, 7 Mar 2012 16:25:16 +0900 Subject: 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 --- policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'policy') diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 0de76a7..7923709 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -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; } -- cgit v1.1