am 6bc7cacf: Merge "Fix NPE in PopupMenu.getDragToOpenListener()" into klp-dev
* commit '6bc7cacfc8c34512278460028b7f6f0a4be220b4': Fix NPE in PopupMenu.getDragToOpenListener()
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user