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

Commit 0e4044c2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 0948445e 16da4085
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;
    }