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

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

Merge "Don't try to open action bar overflow menus from bogus events" into jb-mr1-dev

parents 4acbe2d8 6a5b0a36
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -993,7 +993,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            if (!mActionBar.isOverflowMenuShowing() || !toggleMenuMode) {
                if (cb != null && !isDestroyed() && mActionBar.getVisibility() == View.VISIBLE) {
                    final PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, true);
                    if (cb.onPreparePanel(FEATURE_OPTIONS_PANEL, st.createdPanelView, st.menu)) {

                    // If we don't have a menu or we're waiting for a full content refresh,
                    // forget it. This is a lingering event that no longer matters.
                    if (st.menu != null && !st.refreshMenuContent &&
                            cb.onPreparePanel(FEATURE_OPTIONS_PANEL, st.createdPanelView, st.menu)) {
                        cb.onMenuOpened(FEATURE_ACTION_BAR, st.menu);
                        mActionBar.showOverflowMenu();
                    }