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

Commit 6200a4b7 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE Cherry pick from ics-mr1 - Bug 5275928 - Don't try to open...

Merge "DO NOT MERGE Cherry pick from ics-mr1 - Bug 5275928 - Don't try to open an overflow menu under invalid circumstances." into ics-mr0
parents 5f8b7269 63464c52
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -300,6 +300,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
    public boolean hideOverflowMenu() {
        if (mPostedOpenRunnable != null && mMenuView != null) {
            ((View) mMenuView).removeCallbacks(mPostedOpenRunnable);
            mPostedOpenRunnable = null;
            return true;
        }

@@ -653,10 +654,11 @@ public class ActionMenuPresenter extends BaseMenuPresenter

        public void run() {
            mMenu.changeMenuMode();
            if (mPopup.tryShow()) {
            final View menuView = (View) mMenuView;
            if (menuView != null && menuView.getWindowToken() != null && mPopup.tryShow()) {
                mOverflowPopup = mPopup;
                mPostedOpenRunnable = null;
            }
            mPostedOpenRunnable = null;
        }
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -216,6 +216,9 @@ public class ActionBarContextView extends AbsActionBarView implements AnimatorLi
        });

        final MenuBuilder menu = (MenuBuilder) mode.getMenu();
        if (mActionMenuPresenter != null) {
            mActionMenuPresenter.dismissPopupMenus();
        }
        mActionMenuPresenter = new ActionMenuPresenter(mContext);
        mActionMenuPresenter.setReserveOverflow(true);