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

Commit 0550f1b8 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Check for null MenuHelper before setting presenter callback"

parents 636e71c3 9084d22c
Loading
Loading
Loading
Loading
+7 −5
Original line number Original line Diff line number Diff line
@@ -702,11 +702,13 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
            helper = mWindow.mContextMenu.showDialog(originalView, originalView.getWindowToken());
            helper = mWindow.mContextMenu.showDialog(originalView, originalView.getWindowToken());
        }
        }


        // If it's a dialog, the callback needs to handle showing sub-menus.
        if (helper != null) {
        // Either way, the callback is required for propagating selection to
            // If it's a dialog, the callback needs to handle showing
        // Context.onContextMenuItemSelected().
            // sub-menus. Either way, the callback is required for propagating
            // selection to Context.onContextMenuItemSelected().
            callback.setShowDialogForSubmenu(!isPopup);
            callback.setShowDialogForSubmenu(!isPopup);
            helper.setPresenterCallback(callback);
            helper.setPresenterCallback(callback);
        }


        mWindow.mContextMenuHelper = helper;
        mWindow.mContextMenuHelper = helper;
        return helper != null;
        return helper != null;