summaryrefslogtreecommitdiffstats
path: root/services/java/com
diff options
context:
space:
mode:
authorChris Tate <>2009-03-25 16:22:54 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-25 16:22:54 -0700
commit0f8fc102b9e309a32e76c05c969d3b5e03f8b39e (patch)
tree08d26a814040282dd677ffcf24505e0723ced97b /services/java/com
parent289befd72b3a9a4b84fc4cca81e48ee5f95b8ebf (diff)
downloadframeworks_base-0f8fc102b9e309a32e76c05c969d3b5e03f8b39e.zip
frameworks_base-0f8fc102b9e309a32e76c05c969d3b5e03f8b39e.tar.gz
frameworks_base-0f8fc102b9e309a32e76c05c969d3b5e03f8b39e.tar.bz2
Automated import from //branches/cupcake/...@142783,142783
Diffstat (limited to 'services/java/com')
-rw-r--r--services/java/com/android/server/WindowManagerService.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index ed8b23a..19ab21d 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -8551,6 +8551,15 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
private void startFreezingDisplayLocked() {
if (mDisplayFrozen) {
+ // Freezing the display also suspends key event delivery, to
+ // keep events from going astray while the display is reconfigured.
+ // If someone has changed orientation again while the screen is
+ // still frozen, the events will continue to be blocked while the
+ // successive orientation change is processed. To prevent spurious
+ // ANRs, we reset the event dispatch timeout in this case.
+ synchronized (mKeyWaiter) {
+ mKeyWaiter.mWasFrozen = true;
+ }
return;
}
@@ -8594,10 +8603,8 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
}
Surface.unfreezeDisplay(0);
- // Freezing the display also suspends key event delivery, to
- // keep events from going astray while the display is reconfigured.
- // Now that we're back, notify the key waiter that we're alive
- // again and it should restart its timeouts.
+ // Reset the key delivery timeout on unfreeze, too. We force a wakeup here
+ // too because regular key delivery processing should resume immediately.
synchronized (mKeyWaiter) {
mKeyWaiter.mWasFrozen = true;
mKeyWaiter.notifyAll();