OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c333e1
)
DO NOT MERGE: Don't crash when we get a drag-ended after being detached
author
Christopher Tate
<ctate@google.com>
Mon, 4 Mar 2013 20:57:23 +0000
(12:57 -0800)
committer
Christopher Tate
<ctate@google.com>
Mon, 4 Mar 2013 22:02:29 +0000
(14:02 -0800)
Removing view groups during a drag would cause an NPE here. The
child views will still get the drag-ended event as expected.
(Cherrypicked from downstream)
Bug
8298439
Change-Id: Ic14cbf9fdc305b91c1627f6882a45d34ee1c34ae
core/java/android/view/ViewGroup.java
patch
|
blob
|
history
diff --git
a/core/java/android/view/ViewGroup.java
b/core/java/android/view/ViewGroup.java
index
5105fda
..
df07f3c
100644
(file)
--- a/
core/java/android/view/ViewGroup.java
+++ b/
core/java/android/view/ViewGroup.java
@@
-1152,8
+1152,10
@@
public abstract class ViewGroup extends View implements ViewParent, ViewManager
}
mDragNotifiedChildren.clear();
- mCurrentDrag.recycle();
- mCurrentDrag = null;
+ if (mCurrentDrag != null) {
+ mCurrentDrag.recycle();
+ mCurrentDrag = null;
+ }
}
// We consider drag-ended to have been handled if one of our children