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

Commit ef31e7ca authored by Adam Powell's avatar Adam Powell
Browse files

Fix for toggling menu item visibility outside of create/prepare menu

Allow applications to transition from 0=>1+ visible menu items outside
of onCreatePanelMenu/onPreparePanel. Previously, having 0 visible items
at this point would require an invalidation of the options menu.

Bug 6452605

Change-Id: I6cbfc46d0e5ec42b8d78ee516e9b57fdeaf1a890
parent 87156c96
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2493,7 +2493,7 @@ public class Activity extends ContextThemeWrapper
        if (featureId == Window.FEATURE_OPTIONS_PANEL && menu != null) {
            boolean goforit = onPrepareOptionsMenu(menu);
            goforit |= mFragments.dispatchPrepareOptionsMenu(menu);
            return goforit && menu.hasVisibleItems();
            return goforit;
        }
        return true;
    }