summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-06-13 19:16:55 -0700
committerJeff Brown <jeffbrown@google.com>2010-06-13 19:16:55 -0700
commit8e03b7566c42621fda01186b66b019142eb84fbf (patch)
tree17c45ea04288d2d57053ea740ae1cf332a4308c8 /policy
parent5ddd127d5a38d80c0d8087d1770f41f61f84f048 (diff)
parent9e660c8201ab9aeead5d78a75c2bbfecc374858f (diff)
downloadframeworks_base-8e03b7566c42621fda01186b66b019142eb84fbf.zip
frameworks_base-8e03b7566c42621fda01186b66b019142eb84fbf.tar.gz
frameworks_base-8e03b7566c42621fda01186b66b019142eb84fbf.tar.bz2
resolved conflicts for merge of 9e660c82 to master
Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
Diffstat (limited to 'policy')
-rw-r--r--policy/com/android/internal/policy/impl/KeyguardViewMediator.java2
-rwxr-xr-xpolicy/com/android/internal/policy/impl/PhoneWindowManager.java30
2 files changed, 31 insertions, 1 deletions
diff --git a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
index eb61f5e..88203c3 100644
--- a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
+++ b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -86,7 +86,7 @@ import android.view.WindowManagerPolicy;
* This class is created by the initialization routine of the {@link WindowManagerPolicy},
* and runs on its thread. The keyguard UI is created from that thread in the
* constructor of this class. The apis may be called from other threads, including the
- * {@link com.android.server.KeyInputQueue}'s and {@link android.view.WindowManager}'s.
+ * {@link com.android.server.InputManager}'s and {@link android.view.WindowManager}'s.
* Therefore, methods on this class are synchronized, and any action that is pointed
* directly to the keyguard UI is posted to a {@link Handler} to ensure it is taken on the UI
* thread of the keyguard.
diff --git a/policy/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/com/android/internal/policy/impl/PhoneWindowManager.java
index d152bc4..a01e25b 100755
--- a/policy/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -1641,6 +1641,36 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
return false;
}
+
+ public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) {
+ // lid changed state
+ mLidOpen = lidOpen;
+ boolean awakeNow = mKeyguardMediator.doLidChangeTq(mLidOpen);
+ updateRotation(Surface.FLAGS_ORIENTATION_ANIMATION_DISABLE);
+ if (awakeNow) {
+ // If the lid opening and we don't have to keep the
+ // keyguard up, then we can turn on the screen
+ // immediately.
+ mKeyguardMediator.pokeWakelock();
+ } else if (keyguardIsShowingTq()) {
+ if (mLidOpen) {
+ // If we are opening the lid and not hiding the
+ // keyguard, then we need to have it turn on the
+ // screen once it is shown.
+ mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(
+ KeyEvent.KEYCODE_POWER);
+ }
+ } else {
+ // Light up the keyboard if we are sliding up.
+ if (mLidOpen) {
+ mPowerManager.userActivity(SystemClock.uptimeMillis(), false,
+ LocalPowerManager.BUTTON_EVENT);
+ } else {
+ mPowerManager.userActivity(SystemClock.uptimeMillis(), false,
+ LocalPowerManager.OTHER_EVENT);
+ }
+ }
+ }
/** {@inheritDoc} */