From 14c4669916ae993b248f00c55daf0f17069903d9 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Tue, 9 Oct 2012 18:11:36 -0700 Subject: [PATCH] Cannot force a shown item from an ActionMode into the overflow menu. 1. An app showing an action mode with a visible item that decides to move this item to the overflow menu cannot do so since the action menu is not updated properly. Specifically, ActionMenuPresenter does not clear the "is action button" property of a menu item neither requires nor requests an action button, i.e. the item's "show as action" property changed to be never shown on the action bar. bug:7319766 Change-Id: I5cfda6269466fafca1f039a3bab6397392ae9f17 --- .../com/android/internal/view/menu/ActionMenuPresenter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/com/android/internal/view/menu/ActionMenuPresenter.java b/core/java/com/android/internal/view/menu/ActionMenuPresenter.java index 28113324bf775..4bb6d0694b376 100644 --- a/core/java/com/android/internal/view/menu/ActionMenuPresenter.java +++ b/core/java/com/android/internal/view/menu/ActionMenuPresenter.java @@ -476,6 +476,9 @@ public class ActionMenuPresenter extends BaseMenuPresenter if (isAction) maxActions--; item.setIsActionButton(isAction); + } else { + // Neither requires nor requests an action button. + item.setIsActionButton(false); } } return true;