summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppWidgetResizeFrame.java
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2016-12-19 14:12:05 -0800
committerJon Miranda <jonmiranda@google.com>2016-12-20 09:31:47 -0800
commit2126691ce23b4c62e6d17cb9643faf4c2b3886da (patch)
tree887dea42ae123f2d1ef992f1b4fb2f1ff3053461 /src/com/android/launcher3/AppWidgetResizeFrame.java
parent90a40570bc54506979d3610ee331deacfa7300ec (diff)
downloadandroid_packages_apps_Trebuchet-2126691ce23b4c62e6d17cb9643faf4c2b3886da.tar.gz
android_packages_apps_Trebuchet-2126691ce23b4c62e6d17cb9643faf4c2b3886da.tar.bz2
android_packages_apps_Trebuchet-2126691ce23b4c62e6d17cb9643faf4c2b3886da.zip
Fix widget reorder animations in multi-window mode.
The original animation assumed that the views are not translated and not scaled. In multi-window mode this assumption is no longer valid, because app widgets are scaled and translated to fit center within their cells. Bug: 32176631 Change-Id: Id60c793730d982277c9d91860e9fb0e6a0df7d38
Diffstat (limited to 'src/com/android/launcher3/AppWidgetResizeFrame.java')
-rw-r--r--src/com/android/launcher3/AppWidgetResizeFrame.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/android/launcher3/AppWidgetResizeFrame.java b/src/com/android/launcher3/AppWidgetResizeFrame.java
index 54faca355..90dcc80de 100644
--- a/src/com/android/launcher3/AppWidgetResizeFrame.java
+++ b/src/com/android/launcher3/AppWidgetResizeFrame.java
@@ -354,8 +354,7 @@ public class AppWidgetResizeFrame extends FrameLayout
}
public void snapToWidget(boolean animate) {
- DeviceProfile profile = mLauncher.getDeviceProfile();
- float scale = Math.min(profile.appWidgetScale.x, profile.appWidgetScale.y);
+ float scale = mWidgetView.getScaleToFit();
mDragLayer.getViewRectRelativeToSelf(mWidgetView, sTmpRect);