Skip to content

Commit ef31e7c

Browse files
committed
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
1 parent 87156c9 commit ef31e7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/app/Activity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2493,7 +2493,7 @@ public boolean onPreparePanel(int featureId, View view, Menu menu) {
24932493
if (featureId == Window.FEATURE_OPTIONS_PANEL && menu != null) {
24942494
boolean goforit = onPrepareOptionsMenu(menu);
24952495
goforit |= mFragments.dispatchPrepareOptionsMenu(menu);
2496-
return goforit && menu.hasVisibleItems();
2496+
return goforit;
24972497
}
24982498
return true;
24992499
}

0 commit comments

Comments
 (0)