am 2066f7d9: Merge "Prevent empty overflow popup when there are no overflow items."

* commit '2066f7d9864d46858588a839a7f39a1526c737bc':
  Prevent empty overflow popup when there are no overflow items.
This commit is contained in:
Jean-Baptiste Queru
2012-05-01 06:44:08 -07:00
committed by Android Git Automerger

View File

@@ -277,7 +277,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
*/
public boolean showOverflowMenu() {
if (mReserveOverflow && !isOverflowMenuShowing() && mMenu != null && mMenuView != null &&
mPostedOpenRunnable == null) {
mPostedOpenRunnable == null && !mMenu.getNonActionItems().isEmpty()) {
OverflowPopup popup = new OverflowPopup(mContext, mMenu, mOverflowButton, true);
mPostedOpenRunnable = new OpenOverflowRunnable(popup);
// Post this for later; we might still need a layout for the anchor to be right.