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

Commit 1a9f553b authored by Ben Lin's avatar Ben Lin Committed by Automerger Merge Worker
Browse files

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

Merge "PiP: When there's an animation happening, use animator's destBounds." into rvc-dev am: c0f177b1 am: 0bb2f524 am: d9f40837 am: 643f3817

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11761991

Change-Id: I46a1ab16733353830e996699d0800ddca89462c3
parents 79ce1b8c 643f3817
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;
        }