diff options
| author | 2009-12-11 12:11:31 -0800 | |
|---|---|---|
| committer | 2009-12-11 12:49:33 -0800 | |
| commit | 2624fbcaaa74b3a6d8d60d22d9e16ef26a98a6b2 (patch) | |
| tree | a1e3dc47f0f25a3c549b43db5858b1cdb99c3d67 | |
| parent | f9b0e826689cca5ecbd40aa49f3ea7f7c73ad2a2 (diff) | |
Fix #2320798: Device hang then runtime restart
The system_server process is deadlocking between event dispatch and window
manager code. This change fixes the lock scoping to eliminate the deadlock.
Change-Id: I00f029e4d51d7432119ad3aeec260df215b52546
| -rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index f05cdc488733..aab37b9e9fbb 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -6011,18 +6011,18 @@ public class WindowManagerService extends IWindowManager.Stub res.offsetLocation(-win.mFrame.left, -win.mFrame.top); } } - - if (res != null && returnWhat == RETURN_PENDING_POINTER) { - synchronized (mWindowMap) { - if ((mWallpaperTarget == win && - win.mAttrs.type != WindowManager.LayoutParams.TYPE_KEYGUARD) - || mSendingPointersToWallpaper) { - sendPointerToWallpaperLocked(win, res, res.getEventTime()); - } + } + + if (res != null && returnWhat == RETURN_PENDING_POINTER) { + synchronized (mWindowMap) { + if ((mWallpaperTarget == win && + win.mAttrs.type != WindowManager.LayoutParams.TYPE_KEYGUARD) + || mSendingPointersToWallpaper) { + sendPointerToWallpaperLocked(win, res, res.getEventTime()); } } } - + return res; } |