summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/ViewRoot.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-01-19 12:56:26 -0800
committerChristopher Tate <ctate@google.com>2011-01-19 13:02:24 -0800
commit1fc014fd0051a48083c6d469c2a4f22da1aa15e4 (patch)
tree3cadbda3a0751a91780ef28d609b59a043d1d8c1 /core/java/android/view/ViewRoot.java
parent4243dc394d89a93cb207efa36e9755c2424d688b (diff)
downloadframeworks_base-1fc014fd0051a48083c6d469c2a4f22da1aa15e4.zip
frameworks_base-1fc014fd0051a48083c6d469c2a4f22da1aa15e4.tar.gz
frameworks_base-1fc014fd0051a48083c6d469c2a4f22da1aa15e4.tar.bz2
Fix a couple of drag & drop crashes
1. ViewGroups being removed from the layout during a drag would wind up crashing the app with an NPE at drag-ended time, due to blind dereference of now-cleared object pointers. 2. Passing a 'null' ClipData to startDrag() would crash the system process with an NPE. Should this even be valid? I'm inclined to say yes, though it means that apps will need to guard against it. Fixes bug 3369542 Change-Id: I168fc1284d6fd4403999946609725414cf254df0
Diffstat (limited to 'core/java/android/view/ViewRoot.java')
-rw-r--r--core/java/android/view/ViewRoot.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 961b633..1f15628 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -2803,6 +2803,7 @@ public final class ViewRoot extends Handler implements ViewParent,
// Report the drop result when we're done
if (what == DragEvent.ACTION_DROP) {
+ mDragDescription = null;
try {
Log.i(TAG, "Reporting drop result: " + result);
sWindowSession.reportDropResult(mWindow, result);