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
This commit is contained in:
Jon Miranda
2016-12-19 14:12:05 -08:00
parent 90a40570bc
commit 2126691ce2
5 changed files with 81 additions and 37 deletions

View File

@@ -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);