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

Commit b1f1110d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check if navBar is null onRotationProposal()" into sc-dev

parents 96d45799 c4fd50e2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -855,6 +855,14 @@ public class NavigationBar implements View.OnAttachStateChangeListener,

    @Override
    public void onRotationProposal(final int rotation, boolean isValid) {
        if (mNavigationBarView == null) {
            if (RotationContextButton.DEBUG_ROTATION) {
                Log.v(TAG, "onRotationProposal proposedRotation=" +
                        Surface.rotationToString(rotation) + ", mNavigationBarView is null");
            }
            return;
        }

        final int winRotation = mNavigationBarView.getDisplay().getRotation();
        final boolean rotateSuggestionsDisabled = RotationButtonController
                .hasDisable2RotateSuggestionFlag(mDisabledFlags2);