summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/View.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-09-12 15:22:12 -0700
committerChristopher Tate <ctate@google.com>2011-09-12 18:33:45 -0700
commit8f73b5dfac9be998fcd6cdc30bcb1e4b210ba575 (patch)
treea3977ca084d3db04d67646f17f5389949537916f /core/java/android/view/View.java
parent1667446c90d3dc7806c03da6180c5e4103bda342 (diff)
downloadframeworks_base-8f73b5dfac9be998fcd6cdc30bcb1e4b210ba575.zip
frameworks_base-8f73b5dfac9be998fcd6cdc30bcb1e4b210ba575.tar.gz
frameworks_base-8f73b5dfac9be998fcd6cdc30bcb1e4b210ba575.tar.bz2
Fix bug 5297302 - Remember to release surface after starting drag
Forgetting to release it was "safe" in that GC would eventually tidy it up anyway, but in the meantime it was possible for a user to do lots of drag operations, racing ahead of the progress of the garbage collector, and wind up with drags failing because we'd run out of surface slots due to all the piled up stale drag shadows. Change-Id: I7ac93b13cc9996dda04a404571fbc44cb4314694
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r--core/java/android/view/View.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 1cc428b..65e9857 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -13174,6 +13174,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
shadowSize.x, shadowSize.y,
shadowTouchPoint.x, shadowTouchPoint.y, data);
if (ViewDebug.DEBUG_DRAG) Log.d(VIEW_LOG_TAG, "performDrag returned " + okay);
+
+ // Off and running! Release our local surface instance; the drag
+ // shadow surface is now managed by the system process.
+ surface.release();
}
} catch (Exception e) {
Log.e(VIEW_LOG_TAG, "Unable to initiate drag", e);