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

Commit 08f194bc authored by Steve Block's avatar Steve Block
Browse files

In ActionBarImpl, only use mActionView after we've checked that it's non-null

See https://android-git.corp.google.com/g/#change,61251

Change-Id: Ie11f446c10c096916642a34558a350512495234e
parent 96b25164
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -110,13 +110,13 @@ public class ActionBarImpl extends ActionBar {
                com.android.internal.R.id.lower_action_context_bar);
        mAnimatorView = (ViewAnimator) decor.findViewById(
                com.android.internal.R.id.action_bar_animator);
        mActionView.setContextView(mUpperContextView);

        if (mActionView == null || mUpperContextView == null || mAnimatorView == null) {
            throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
                    "with a compatible window decor layout");
        }

        mActionView.setContextView(mUpperContextView);
        mContextDisplayMode = mLowerContextView == null ?
                CONTEXT_DISPLAY_NORMAL : CONTEXT_DISPLAY_SPLIT;
    }