Introduce a new Home animation for workspace and the outgoing task.

The values are currently the same for all display and orientation
configurations, but they might change before launch.

There are a couple known imperfections:
* Swiping out of a hotseat app with very low velocity doesn't look
  great
* Sometimes, if the window movement reaches its final location faster
  than the background is done scaling, there is a small snap in icon
  position

Bug: 298089923
Flag: ACONFIG com.android.launcher3.enable_scaling_reveal_home_animation DISABLED
Test: verified with the flag on and off

Change-Id: Id54c7f0a76f62108d8b92a3b5e78634fff64dbef
This commit is contained in:
Luca Zuccarini committed 2024-03-14 10:48:02 +00:00
1 parent d640a152cd
commit c9cbc9d5a1
18 files changed
+463 -98

No files matched your search

+6 -1
View File
@@ -18,6 +18,7 @@ package com.android.launcher3;
import static com.android.app.animation.Interpolators.LINEAR;
import static com.android.launcher3.Flags.enableOverviewIconMenu;
import static com.android.launcher3.Flags.enableScalingRevealHomeAnimation;
import static com.android.launcher3.InvariantDeviceProfile.INDEX_DEFAULT;
import static com.android.launcher3.InvariantDeviceProfile.INDEX_LANDSCAPE;
import static com.android.launcher3.InvariantDeviceProfile.INDEX_TWO_PANEL_LANDSCAPE;
@@ -436,7 +437,11 @@ public class DeviceProfile {
if (isMultiDisplay && !ENABLE_MULTI_DISPLAY_PARTIAL_DEPTH.get()) {
// TODO(b/259893832): Revert to use maxWallpaperScale to calculate bottomSheetDepth
// when screen recorder bug is fixed.
bottomSheetDepth = 1f;
if (enableScalingRevealHomeAnimation()) {
bottomSheetDepth = 0.3f;
} else {
bottomSheetDepth = 1f;
}
} else {
// The goal is to set wallpaper to zoom at workspaceContentScale when in AllApps.
// When depth is 0, wallpaper zoom is set to maxWallpaperScale.