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

Commit a3fb9e58 authored by Mateusz Cicheński's avatar Mateusz Cicheński
Browse files

Early bail out if the leash is invalid.

Test: repeat b/275536875#comment7 until the log shows up, but nothing crashes
Bug: 275536875
Change-Id: I98538d38cc79c7db700318b727d5a945e7148d9f
parent d0316dc1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1582,6 +1582,11 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
            @PipAnimationController.TransitionDirection int direction,
            SurfaceControl.Transaction tx,
            WindowContainerTransaction wct) {
        if (mLeash == null || !mLeash.isValid()) {
            ProtoLog.w(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                    "%s: Invalid leash on prepareFinishResizeTransaction: %s", TAG, mLeash);
            return;
        }
        final Rect taskBounds;
        if (isInPipDirection(direction)) {
            // If we are animating from fullscreen using a bounds animation, then reset the