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

Commit c0f177b1 authored by Ben Lin's avatar Ben Lin Committed by Android (Google) Code Review
Browse files

Merge "PiP: When there's an animation happening, use animator's destBounds." into rvc-dev

parents f536da7d ba4b76b2
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -504,9 +504,19 @@ public class PipTaskOrganizer extends TaskOrganizer implements
                // this could happen if rotation finishes before the animation
                mLastReportedBounds.set(destinationBoundsOut);
                scheduleFinishResizePip(mLastReportedBounds);
            } else if (!mLastReportedBounds.isEmpty()) {
            } else  {
                // There could be an animation on-going. If there is one on-going, last-reported
                // bounds isn't yet updated. We'll use the animator's bounds instead.
                if (animator != null && animator.isRunning()) {
                    if (!animator.getDestinationBounds().isEmpty()) {
                        destinationBoundsOut.set(animator.getDestinationBounds());
                    }
                } else {
                    if (!mLastReportedBounds.isEmpty()) {
                        destinationBoundsOut.set(mLastReportedBounds);
                    }
                }
            }
            return;
        }