diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-02-16 17:37:37 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-02-16 17:37:37 +0000 |
commit | c41b87705149b7dc95498a49b2cf46acfabf5e2f (patch) | |
tree | 53ee666533d50763f97b3f726878d56b8f2432d4 /quickstep/src/com/android/launcher3/QuickstepTransitionManager.java | |
parent | af3034c3ce25f268fb8279dc3eb611418ee57f42 (diff) | |
parent | 62d30d71f487069d6ecb0ce7d7b1beab15d00a87 (diff) |
Merge cherrypicks of [16685428, 16688543, 16684091] into sc-v2-release. am: 62d30d71f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16874565
Change-Id: I8948cdc5588b4b620cd31c243a74b81361d605e5
Diffstat (limited to 'quickstep/src/com/android/launcher3/QuickstepTransitionManager.java')
-rw-r--r-- | quickstep/src/com/android/launcher3/QuickstepTransitionManager.java | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 6e2fadd7d3..49b2cc5894 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -367,7 +367,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener if (launcherClosing) { // Delay animation by a frame to avoid jank. Pair<AnimatorSet, Runnable> launcherContentAnimator = - getLauncherContentAnimator(true /* isAppOpening */, startDelay); + getLauncherContentAnimator(true /* isAppOpening */, startDelay, false); anim.play(launcherContentAnimator.first); anim.addListener(new AnimatorListenerAdapter() { @Override @@ -464,9 +464,10 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener * @param isAppOpening True when this is called when an app is opening. * False when this is called when an app is closing. * @param startDelay Start delay duration. + * @param skipAllAppsScale True if we want to avoid scaling All Apps */ private Pair<AnimatorSet, Runnable> getLauncherContentAnimator(boolean isAppOpening, - int startDelay) { + int startDelay, boolean skipAllAppsScale) { AnimatorSet launcherAnimator = new AnimatorSet(); Runnable endListener; @@ -484,7 +485,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener final float startAlpha = appsView.getAlpha(); final float startScale = SCALE_PROPERTY.get(appsView); appsView.setAlpha(alphas[0]); - SCALE_PROPERTY.set(appsView, scales[0]); ObjectAnimator alpha = ObjectAnimator.ofFloat(appsView, View.ALPHA, alphas); alpha.setDuration(CONTENT_ALPHA_DURATION); @@ -496,12 +496,16 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener appsView.setLayerType(View.LAYER_TYPE_NONE, null); } }); - ObjectAnimator scale = ObjectAnimator.ofFloat(appsView, SCALE_PROPERTY, scales); - scale.setInterpolator(AGGRESSIVE_EASE); - scale.setDuration(CONTENT_SCALE_DURATION); + + if (!skipAllAppsScale) { + SCALE_PROPERTY.set(appsView, scales[0]); + ObjectAnimator scale = ObjectAnimator.ofFloat(appsView, SCALE_PROPERTY, scales); + scale.setInterpolator(AGGRESSIVE_EASE); + scale.setDuration(CONTENT_SCALE_DURATION); + launcherAnimator.play(scale); + } launcherAnimator.play(alpha); - launcherAnimator.play(scale); endListener = () -> { appsView.setAlpha(startAlpha); @@ -1565,6 +1569,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener || mLauncher.getWorkspace().isOverlayShown(); boolean playWorkspaceReveal = true; + boolean skipAllAppsScale = false; if (mFromUnlock) { anim.play(getUnlockWindowAnimator(appTargets, wallpaperTargets)); } else if (ENABLE_BACK_SWIPE_HOME_ANIMATION.get() @@ -1579,6 +1584,10 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener true /* animateOverviewScrim */, launcherView).getAnimators()); // We play StaggeredWorkspaceAnim as a part of the closing window animation. playWorkspaceReveal = false; + } else { + // Skip scaling all apps, otherwise FloatingIconView will get wrong + // layout bounds. + skipAllAppsScale = true; } } else { anim.play(getFallbackClosingWindowAnimators(appTargets)); @@ -1600,7 +1609,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener if (mLauncher.isInState(LauncherState.ALL_APPS)) { Pair<AnimatorSet, Runnable> contentAnimator = - getLauncherContentAnimator(false, LAUNCHER_RESUME_START_DELAY); + getLauncherContentAnimator(false, LAUNCHER_RESUME_START_DELAY, + skipAllAppsScale); anim.play(contentAnimator.first); anim.addListener(new AnimatorListenerAdapter() { @Override |