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

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

Bail early in exitPip if leash is null

Add check in exitPip if we ever have an invalid leash.

Bug: 347314493
Test: manual check
Flag: EXEMPT bugfix
Change-Id: I6f492601e6dfb5b21be13b879108f39cdc24bbcb
parent 47d9e6e1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -635,6 +635,13 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
            return;
        }

        // bail early if leash is null
        if (mLeash == null) {
            ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                    "exitPip: leash is null");
            return;
        }

        final Rect destinationBounds = new Rect(getExitDestinationBounds());
        final int direction = syncWithSplitScreenBounds(destinationBounds, requestEnterSplit)
                ? TRANSITION_DIRECTION_LEAVE_PIP_TO_SPLIT_SCREEN