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

Commit 2944b92e authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Add null check to EdgeBackGestureHandler#setBackAnimation

Bug: 364526759
Test: Manual, i.e. verify that back navigation works fine when BackAnimation is null
Flag: EXEMPT bugfix
Change-Id: I6ee307fd771ea17e6b1cd6ee2a129377754c5883
parent c8320565
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_T
import static java.util.stream.Collectors.joining;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
@@ -1331,21 +1332,20 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
        }
    }

    public void setBackAnimation(BackAnimation backAnimation) {
    public void setBackAnimation(@Nullable BackAnimation backAnimation) {
        mBackAnimation = backAnimation;
        mBackAnimation.setPilferPointerCallback(() -> {
            pilferPointers();
        });
        mBackAnimation.setTopUiRequestCallback(
        if (backAnimation != null) {
            backAnimation.setPilferPointerCallback(this::pilferPointers);
            backAnimation.setTopUiRequestCallback(
                    (requestTopUi, tag) -> mUiThreadContext.getExecutor().execute(() ->
                            mNotificationShadeWindowController.setRequestTopUi(requestTopUi, tag)));
            updateBackAnimationThresholds();
            if (mLightBarControllerProvider.get() != null) {
            mBackAnimation.setStatusBarCustomizer((appearance) -> {
                mBackAnimation.setStatusBarCustomizer((appearance) ->
                        mUiThreadContext.getExecutor().execute(() ->
                            mLightBarControllerProvider.get()
                                .customizeStatusBarAppearance(appearance));
            });
                                    .customizeStatusBarAppearance(appearance)));
            }
        }
    }