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

Commit 4e10483d authored by Alan Viverette's avatar Alan Viverette Committed by Android Git Automerger
Browse files

am 6bc7cacf: Merge "Fix NPE in PopupMenu.getDragToOpenListener()" into klp-dev

* commit '6bc7cacf':
  Fix NPE in PopupMenu.getDragToOpenListener()
parents 8d87227c 6bc7cacf
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -92,8 +92,21 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback {
    public OnTouchListener getDragToOpenListener() {
        if (mDragListener == null) {
            mDragListener = new ForwardingListener(mAnchor) {
                @Override
                protected boolean onForwardingStarted() {
                    show();
                    return true;
                }

                @Override
                protected boolean onForwardingStopped() {
                    dismiss();
                    return true;
                }

                @Override
                public ListPopupWindow getPopup() {
                    // This will be null until show() is called.
                    return mPopup.getPopup();
                }
            };