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

Commit 067d9599 authored by Perry Wu's avatar Perry Wu Committed by Android Build Coastguard Worker
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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bb2a4b3668604e878c082efead397f85ba002445)
Merged-In: I6f492601e6dfb5b21be13b879108f39cdc24bbcb
Change-Id: I6f492601e6dfb5b21be13b879108f39cdc24bbcb
parent 2da5f73e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -634,6 +634,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