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

Commit 8d12e201 authored by Adam Powell's avatar Adam Powell
Browse files

Fix a couple interactions between action bar and options menus

Fix bug 3129937 - Activity.openOptionsMenu not calling onPrepareOptionsMenu

Fix bug 3070720 - actionbar android.R.id.home isn't dispatched to fragments

Change-Id: I4a154941595583cdec7d1dffbeac9c8340781fa0
parent 645336a7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.HorizontalScrollView;
import android.widget.ImageView;
@@ -219,7 +220,7 @@ public class ActionBarView extends ViewGroup {
            Context context = getContext();
            if (context instanceof Activity) {
              Activity activity = (Activity) context;
              activity.onOptionsItemSelected(mLogoNavItem);
              activity.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, mLogoNavItem);
            }
          }
        });
+2 −0
Original line number Diff line number Diff line
@@ -411,6 +411,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
    public final void openPanel(int featureId, KeyEvent event) {
        if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null &&
                mActionBar.isOverflowReserved()) {
            // Invalidate the options menu, we want a prepare event that the app can respond to.
            invalidatePanelMenu(FEATURE_OPTIONS_PANEL);
            mActionBar.showOverflowMenu();
        } else {
            openPanel(getPanelState(featureId, true), event);