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

Commit 5cd13265 authored by Chris Banes's avatar Chris Banes
Browse files

Fix NPE in ActionMenuView when there isn't a presenter

BUG: 19060917
Change-Id: I5d63aa6e85238ea7cec6faf60d444c98bc583293
parent 2e139d5b
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -116,13 +116,16 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo
    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);

        if (mPresenter != null) {
            mPresenter.updateMenuView(false);

        if (mPresenter != null && mPresenter.isOverflowMenuShowing()) {
            if (mPresenter.isOverflowMenuShowing()) {
                mPresenter.hideOverflowMenu();
                mPresenter.showOverflowMenu();
            }
        }
    }

    public void setOnMenuItemClickListener(OnMenuItemClickListener listener) {
        mOnMenuItemClickListener = listener;