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

Commit 1262d0c8 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix action menu visibility callbacks for nested popups" into klp-dev

parents b611eb94 b411b328
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -721,7 +721,8 @@ public class ActionMenuPresenter extends BaseMenuPresenter
            if (subMenu == null) return false;

            mOpenSubMenuId = ((SubMenuBuilder) subMenu).getItem().getItemId();
            return false;
            final MenuPresenter.Callback cb = getCallback();
            return cb != null ? cb.onOpenSubMenu(subMenu) : false;
        }

        @Override
@@ -729,6 +730,10 @@ public class ActionMenuPresenter extends BaseMenuPresenter
            if (menu instanceof SubMenuBuilder) {
                ((SubMenuBuilder) menu).getRootMenu().close(false);
            }
            final MenuPresenter.Callback cb = getCallback();
            if (cb != null) {
                cb.onCloseMenu(menu, allMenusAreClosing);
            }
        }
    }

+4 −0
Original line number Diff line number Diff line
@@ -144,6 +144,10 @@ public abstract class BaseMenuPresenter implements MenuPresenter {
        mCallback = cb;
    }

    public Callback getCallback() {
        return mCallback;
    }

    /**
     * Create a new item view that can be re-bound to other item data later.
     *