Keep foreground drawable centered during app open/close animation.

For apps that use AdaptiveIcon, we used to animate the foreground
drawable independently from the background. This is sometimes
perceived as jank so we remove the animation since it is very subtle
in the best case scenario.

Bug: 268026344
Test: open/close apps/folders that use AdaptiveIcons
Change-Id: I500bf56e04823757d511d909a93d3b30703249a1
This commit is contained in:
Jon Miranda
2023-03-17 08:56:31 -07:00
parent 713931ec38
commit f23e2d1e16
5 changed files with 24 additions and 99 deletions

View File

@@ -794,7 +794,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
if (initOnly) {
// For the init pass, we want full alpha since the window is not yet ready.
floatingView.update(1f, 255, floatingIconBounds, percent, 0f,
floatingView.update(1f, floatingIconBounds, percent, 0f,
mWindowRadius.value * scale, true /* isOpening */);
return;
}
@@ -822,7 +822,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
matrix.postTranslate(windowTransX0, windowTransY0);
}
floatingView.update(mIconAlpha.value, 255, floatingIconBounds, percent, 0f,
floatingView.update(mIconAlpha.value, floatingIconBounds, percent, 0f,
mWindowRadius.value * scale, true /* isOpening */);
builder.setMatrix(matrix)
.setWindowCrop(crop)
@@ -1381,8 +1381,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
windowTargetBounds, startWindowCornerRadius) {
@Override
public void onUpdate(RectF currentRectF, float progress) {
finalFloatingIconView.update(1f, 255 /* fgAlpha */, currentRectF, progress,
windowAlphaThreshold, getCornerRadius(progress), false);
finalFloatingIconView.update(1f, currentRectF, progress, windowAlphaThreshold,
getCornerRadius(progress), false);
super.onUpdate(currentRectF, progress);
}