Skip to content

Commit 2066f7d

Browse files
Jean-Baptiste Queruandroid code review
authored andcommitted
Merge "Prevent empty overflow popup when there are no overflow items."
2 parents d805c67 + a647640 commit 2066f7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/com/android/internal/view/menu/ActionMenuPresenter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ private View findViewForItem(MenuItem item) {
277277
*/
278278
public boolean showOverflowMenu() {
279279
if (mReserveOverflow && !isOverflowMenuShowing() && mMenu != null && mMenuView != null &&
280-
mPostedOpenRunnable == null) {
280+
mPostedOpenRunnable == null && !mMenu.getNonActionItems().isEmpty()) {
281281
OverflowPopup popup = new OverflowPopup(mContext, mMenu, mOverflowButton, true);
282282
mPostedOpenRunnable = new OpenOverflowRunnable(popup);
283283
// Post this for later; we might still need a layout for the anchor to be right.

0 commit comments

Comments
 (0)