diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2019-06-05 12:07:07 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2019-06-05 12:25:28 -0700 |
commit | bda6b45341a4f88e318e041f44fa37b787b6de84 (patch) | |
tree | ce5e028d6996527c1f960873360ddbbd25ce8281 /src/com/android/launcher3/views | |
parent | 8d19146b7b90664e1290d1c186c93e6d17fa94e8 (diff) | |
download | android_packages_apps_Trebuchet-bda6b45341a4f88e318e041f44fa37b787b6de84.tar.gz android_packages_apps_Trebuchet-bda6b45341a4f88e318e041f44fa37b787b6de84.tar.bz2 android_packages_apps_Trebuchet-bda6b45341a4f88e318e041f44fa37b787b6de84.zip |
Fixing wrong origin when launching new task from overview
> Also removing some unnecessary layout passes during launch animation
Bug: 133226418
Change-Id: I36fe69827853366deb7c56ca25f39e20c1a0b825
Diffstat (limited to 'src/com/android/launcher3/views')
-rw-r--r-- | src/com/android/launcher3/views/FloatingIconView.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java index 95c96817a..339681cd6 100644 --- a/src/com/android/launcher3/views/FloatingIconView.java +++ b/src/com/android/launcher3/views/FloatingIconView.java @@ -124,6 +124,7 @@ public class FloatingIconView extends View implements private boolean mIsVerticalBarLayout = false; private boolean mIsAdaptiveIcon = false; + private boolean mIsOpening; private @Nullable Drawable mBadge; private @Nullable Drawable mForeground; @@ -178,8 +179,10 @@ public class FloatingIconView extends View implements @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); - getViewTreeObserver().addOnGlobalLayoutListener(this); - mLauncher.getRotationHelper().setCurrentTransitionRequest(REQUEST_LOCK); + if (!mIsOpening) { + getViewTreeObserver().addOnGlobalLayoutListener(this); + mLauncher.getRotationHelper().setCurrentTransitionRequest(REQUEST_LOCK); + } } @Override @@ -326,7 +329,7 @@ public class FloatingIconView extends View implements * - For BubbleTextView, we return the icon bounds. */ private float getLocationBoundsForView(View v, RectF outRect) { - boolean ignoreTransform = true; + boolean ignoreTransform = !mIsOpening; if (v instanceof DeepShortcutView) { v = ((DeepShortcutView) v).getBubbleText(); ignoreTransform = false; @@ -627,6 +630,7 @@ public class FloatingIconView extends View implements view.recycle(); view.mIsVerticalBarLayout = launcher.getDeviceProfile().isVerticalBarLayout(); + view.mIsOpening = isOpening; view.mOriginalIcon = originalView; view.mPositionOut = positionOut; |