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

Commit 16da4085 authored by Jerry Chang's avatar Jerry Chang
Browse files

Fix leaving Pip will sync with divider bounds even not in split screen

Fix: 165890643
Test: atest PinnedStackTests
Change-Id: Ifb825e64281eee2be1c80ee5a4d0d84dc414a9a9
parent cde03184
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -945,13 +945,18 @@ public class PipTaskOrganizer extends TaskOrganizer implements ShellTaskOrganize
     */
    private boolean syncWithSplitScreenBounds(Rect destinationBoundsOut) {
        if (!mSplitScreenControllerOptional.isPresent()) {
            return false;
        }

        SplitScreenController splitScreenController = mSplitScreenControllerOptional.get();
        if (!splitScreenController.isDividerVisible()) {
            // fail early if system is not in split screen mode
            return false;
        }

        // PiP window will go to split-secondary mode instead of fullscreen, populates the
        // split screen bounds here.
        destinationBoundsOut.set(mSplitScreenControllerOptional.get().getDividerView()
        destinationBoundsOut.set(splitScreenController.getDividerView()
                .getNonMinimizedSplitScreenSecondaryBounds());
        return true;
    }