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

Commit d86d7bce authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Use action mode context for ActionMode menu inflater" into lmp-mr1-dev

parents 85d6f299 3abf5c4b
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -936,11 +936,14 @@ public class WindowDecorActionBar extends ActionBar implements
     * @hide
     */
    public class ActionModeImpl extends ActionMode implements MenuBuilder.Callback {
        private final Context mActionModeContext;
        private final MenuBuilder mMenu;

        private ActionMode.Callback mCallback;
        private MenuBuilder mMenu;
        private WeakReference<View> mCustomView;

        public ActionModeImpl(Context context, ActionMode.Callback callback) {
            mActionModeContext = context;
            mCallback = callback;
            mMenu = new MenuBuilder(context)
                    .setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
@@ -949,7 +952,7 @@ public class WindowDecorActionBar extends ActionBar implements

        @Override
        public MenuInflater getMenuInflater() {
            return new MenuInflater(getThemedContext());
            return new MenuInflater(mActionModeContext);
        }

        @Override