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

Commit e2cc5fba authored by Johannes Gallmann's avatar Johannes Gallmann Committed by Android (Google) Code Review
Browse files

Merge "Add null check to EdgeBackGestureHandler#setBackAnimation" into main

parents 0cca154f 2944b92e
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)));
            }
        }
    }