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

Commit de164ba7 authored by Perry Wu's avatar Perry Wu
Browse files

[PIP2] Fix NPE for onSwipePipToHomeAnimation

Fixes an NPE with the recentsAnimationListener when swiping to home.

Bug: 380544965
Flag: EXEMPT bugfix
Test: N/A
Change-Id: I378603e6aeae58559d1344e83c9f8e573e144dad
parent dfc9b155
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ public class PipController implements ConfigurationChangeListener,
    private final List<Consumer<Boolean>> mOnIsInPipStateChangedListeners = new ArrayList<>();

    // Wrapper for making Binder calls into PiP animation listener hosted in launcher's Recents.
    private PipAnimationListener mPipRecentsAnimationListener;
    @Nullable private PipAnimationListener mPipRecentsAnimationListener;

    @VisibleForTesting
    interface PipAnimationListener {
@@ -378,8 +378,10 @@ public class PipController implements ConfigurationChangeListener,
            tx.setLayer(overlay, Integer.MAX_VALUE);
            tx.apply();
        }
        if (mPipRecentsAnimationListener != null) {
            mPipRecentsAnimationListener.onPipAnimationStarted();
        }
    }

    private void setLauncherKeepClearAreaHeight(boolean visible, int height) {
        ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,