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

Commit 53023ffd authored by Alan Viverette's avatar Alan Viverette
Browse files

SubMenuBuilder.getRootMenu() should return root menu, not parent

Also fixes incorrect call from MenuItemImpl to dispatchMenuSelected,
which should according to the documentation be passing the direct
parent menu of the menu item.

Bug: 23725571
Change-Id: I2d1f04b80ce05d141ba2dfd77f62bb13b2268625
parent d2c1ac47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ public final class MenuItemImpl implements MenuItem {
            return true;
        }

        if (mMenu.dispatchMenuItemSelected(mMenu.getRootMenu(), this)) {
        if (mMenu.dispatchMenuItemSelected(mMenu, this)) {
            return true;
        }

+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ public class SubMenuBuilder extends MenuBuilder implements SubMenu {

    @Override
    public MenuBuilder getRootMenu() {
        return mParentMenu;
        return mParentMenu.getRootMenu();
    }

    @Override