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

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

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

* commit '4e10483d':
  Fix NPE in PopupMenu.getDragToOpenListener()
parents caf2afc1 4e10483d
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();
                }
            };