Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9accff2 authored by Christopher Tate's avatar Christopher Tate
Browse files

Don't crash when we get a drag-ended after being detached

Removing view groups during a drag would cause an NPE here.  The
child views will still get the drag-ended event as expected.

Bug 8298439

Change-Id: I665ba1d139e8aaa820f5f515186bc4ce8bcdb1ea
parent a729a34a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1162,9 +1162,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                }

                mDragNotifiedChildren.clear();
                if (mCurrentDrag != null) {
                    mCurrentDrag.recycle();
                    mCurrentDrag = null;
                }
            }

            // We consider drag-ended to have been handled if one of our children
            // had offered to handle the drag.