diff options
author | Christopher Tate <ctate@google.com> | 2011-01-19 16:41:14 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-19 16:41:14 -0800 |
commit | 28f0a53a882a39bc22bc5892250411cadf6c0d5d (patch) | |
tree | 88892bc90b5d5903faea8b377e07836dd1081642 /services | |
parent | 1c0012e103a380489fe4a150247cd226de9a89a6 (diff) | |
parent | f01af7551b3cf8853d3a76412c2745a543063434 (diff) | |
download | frameworks_base-28f0a53a882a39bc22bc5892250411cadf6c0d5d.zip frameworks_base-28f0a53a882a39bc22bc5892250411cadf6c0d5d.tar.gz frameworks_base-28f0a53a882a39bc22bc5892250411cadf6c0d5d.tar.bz2 |
Merge "Fail more gracefully when window state changes during drags" into honeycomb
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index bbb2228..b7ff64d 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -708,16 +708,20 @@ public class WindowManagerService extends IWindowManager.Stub // Move the surface to the given touch if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION notifyMoveLw"); - mSurface.openTransaction(); + Surface.openTransaction(); try { mSurface.setPosition((int)(x - mThumbOffsetX), (int)(y - mThumbOffsetY)); } finally { - mSurface.closeTransaction(); + Surface.closeTransaction(); if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION notifyMoveLw"); } // Tell the affected window WindowState touchedWin = getTouchedWinAtPointLw(x, y); + if (touchedWin == null) { + if (DEBUG_DRAG) Slog.d(TAG, "No touched win at x=" + x + " y=" + y); + return; + } if ((mFlags & View.DRAG_FLAG_GLOBAL) == 0) { final IBinder touchedBinder = touchedWin.mClient.asBinder(); if (touchedBinder != mLocalWin) { |