summaryrefslogtreecommitdiffstats
path: root/quickstep/src
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2019-04-30 12:03:39 -0700
committerJon Miranda <jonmiranda@google.com>2019-04-30 12:03:39 -0700
commit063211f620595f1258518d0cecfa9c57d41853b9 (patch)
tree990f8451ef0048f46afddc1263365429276b96e6 /quickstep/src
parent287f5d5aef7638d336a557aa53b90fc1af665079 (diff)
downloadandroid_packages_apps_Trebuchet-063211f620595f1258518d0cecfa9c57d41853b9.tar.gz
android_packages_apps_Trebuchet-063211f620595f1258518d0cecfa9c57d41853b9.tar.bz2
android_packages_apps_Trebuchet-063211f620595f1258518d0cecfa9c57d41853b9.zip
Fix app open animation in landscape.
Bug: 130828765 Change-Id: Ic447d05a8fe2097a6afd0bfec73039a62bbf5a4b
Diffstat (limited to 'quickstep/src')
-rw-r--r--quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
index 886dcc3de..a8666f9da 100644
--- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
+++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
@@ -422,10 +422,9 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
// Scale the app icon to take up the entire screen. This simplifies the math when
// animating the app window position / scale.
- float maxScaleX = windowTargetBounds.width() / (float) bounds.width();
- // We use windowTargetBounds.width for scaleY too since we start off the animation where the
- // window is clipped to a square.
- float maxScaleY = windowTargetBounds.width() / (float) bounds.height();
+ float smallestSize = Math.min(windowTargetBounds.height(), windowTargetBounds.width());
+ float maxScaleX = smallestSize / (float) bounds.width();
+ float maxScaleY = smallestSize / (float) bounds.height();
float scale = Math.max(maxScaleX, maxScaleY);
float startScale = 1f;
if (v instanceof BubbleTextView && !(v.getParent() instanceof DeepShortcutView)) {