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

Commit 59e17d43 authored by Mateusz Cicheński's avatar Mateusz Cicheński Committed by Automerger Merge Worker
Browse files

Merge "Make sure PiP appears on screen when folding the device" into...

Merge "Make sure PiP appears on screen when folding the device" into tm-qpr-dev am: a490e750 am: cb7a5f07 am: d82a33a4

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



Change-Id: I50eae47a90c7dc3132161a66052a35a9d2ced127
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b6d3c6ba d82a33a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ public class PipAnimationController {
    /**
     * Quietly cancel the animator by removing the listeners first.
     */
    static void quietCancel(@NonNull ValueAnimator animator) {
    public static void quietCancel(@NonNull ValueAnimator animator) {
        animator.removeAllUpdateListeners();
        animator.removeAllListeners();
        animator.cancel();
+6 −0
Original line number Diff line number Diff line
@@ -715,6 +715,12 @@ public class PipController implements PipTransitionController.PipTransitionCallb

    private void onDisplayChanged(DisplayLayout layout, boolean saveRestoreSnapFraction) {
        if (!mPipBoundsState.getDisplayLayout().isSameGeometry(layout)) {
            PipAnimationController.PipTransitionAnimator animator =
                    mPipAnimationController.getCurrentAnimator();
            if (animator != null && animator.isRunning()) {
                // cancel any running animator, as it is using stale display layout information
                PipAnimationController.quietCancel(animator);
            }
            onDisplayChangedUncheck(layout, saveRestoreSnapFraction);
        }
    }