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

Commit c4fd50e2 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Check if navBar is null onRotationProposal()

Bug: 180373190
Change-Id: Iecdd02c4a2aeed2c41f0ff3dbf882440803d8302
parent 8168b608
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);