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

Commit f581b533 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 2b662e8e: Merge "Fix a NPE in MenuItemImpl when setting null ActionProvider" into jb-mr2-dev

* commit '2b662e8e':
  Fix a NPE in MenuItemImpl when setting null ActionProvider
parents 91091ea6 2b662e8e
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -598,11 +598,13 @@ public final class MenuItemImpl implements MenuItem {
        mActionView = null;
        mActionProvider = actionProvider;
        mMenu.onItemsChanged(true); // Measurement can be changed
        if (mActionProvider != null) {
            mActionProvider.setVisibilityListener(new ActionProvider.VisibilityListener() {
                @Override public void onActionProviderVisibilityChanged(boolean isVisible) {
                    mMenu.onItemVisibleChanged(MenuItemImpl.this);
                }
            });
        }
        return this;
    }