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

Commit e14c4750 authored by Mike Digman's avatar Mike Digman
Browse files

Ensure rotate disable2 flag can be set on boot

SUW sometimes calls disable2 before getView() is non-null.

Change-Id: I6a201e05da5e1d72829f469487279d2c607f6eed
Fixes: 75291849
Test: manual
parent 4a99e98b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -464,7 +464,10 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
    private void onRotationSuggestionsDisabled() {
        // Immediately hide the rotate button and clear any planned removal
        setRotateSuggestionButtonState(false, true);
        getView().removeCallbacks(mRemoveRotationProposal);

        // This method can be called before view setup is done, ensure getView isn't null
        final View v = getView();
        if (v != null) v.removeCallbacks(mRemoveRotationProposal);
    }

    private void showAndLogRotationSuggestion() {