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

Commit 429338e3 authored by Manu Cornet's avatar Manu Cornet Committed by android-build-merger
Browse files

2D Recents: Fix issues with thumbnail scaling transitions am: 57b6149f

am: 6f5bb1f3

Change-Id: I0556939ca9c94965865ac050a98981a347f6d0aa
parents 9a32a2c1 6f5bb1f3
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -743,11 +743,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
            Task toTask = new Task();
            TaskViewTransform toTransform = getThumbnailTransitionTransform(stackView, toTask,
                    windowOverrideRect);
            // When using a grid layout, the header is already visible on screen at the target
            // location, making it unnecessary to draw it in the transition thumbnail.
            Bitmap thumbnail = stackView.useGridLayout()
                    ? mThumbTransitionBitmapCache.createAshmemBitmap()
                    : drawThumbnailTransitionBitmap(toTask, toTransform,
            Bitmap thumbnail = drawThumbnailTransitionBitmap(toTask, toTransform,
                            mThumbTransitionBitmapCache);
            if (thumbnail != null) {
                RectF toTaskRect = toTransform.rect;
+16 −4
Original line number Diff line number Diff line
@@ -951,9 +951,9 @@ public class AppTransition implements Dump {
        float scaleW = appWidth / thumbWidth;
        getNextAppTransitionStartRect(taskId, mTmpRect);
        final float fromX;
        final float fromY;
        float fromY;
        final float toX;
        final float toY;
        float toY;
        final float pivotX;
        final float pivotY;
        if (shouldScaleDownThumbnailTransition(uiMode, orientation)) {
@@ -966,6 +966,12 @@ public class AppTransition implements Dump {
            toY = appRect.height() / 2 * (1 - 1 / scaleW) + appRect.top;
            pivotX = mTmpRect.width() / 2;
            pivotY = appRect.height() / 2 / scaleW;
            if (mGridLayoutRecentsEnabled) {
                // In the grid layout, the header is displayed above the thumbnail instead of
                // overlapping it.
                fromY -= thumbHeightI;
                toY -= thumbHeightI * scaleW;
            }
        } else {
            pivotX = 0;
            pivotY = 0;
@@ -1014,7 +1020,10 @@ public class AppTransition implements Dump {
            // This AnimationSet uses the Interpolators assigned above.
            AnimationSet set = new AnimationSet(false);
            set.addAnimation(scale);
            if (!mGridLayoutRecentsEnabled) {
                // In the grid layout, the header should be shown for the whole animation.
                set.addAnimation(alpha);
            }
            set.addAnimation(translate);
            set.addAnimation(clipAnim);
            a = set;
@@ -1033,7 +1042,10 @@ public class AppTransition implements Dump {
            // This AnimationSet uses the Interpolators assigned above.
            AnimationSet set = new AnimationSet(false);
            set.addAnimation(scale);
            if (!mGridLayoutRecentsEnabled) {
                // In the grid layout, the header should be shown for the whole animation.
                set.addAnimation(alpha);
            }
            set.addAnimation(translate);
            a = set;