From d418f3c3fa17c4c4a0ae552541ca78acd42917ff Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 23 Jul 2019 13:33:53 -0700 Subject: [PATCH] Set FastBitmapDrawable scale=1 before drawing it in DragView When we draw the icon to the DragView, we draw it with the current scale, which is > 1 when animating the icon down. Instead, we should always draw the icon with scale 1 since the DragView itself is scaled. Bug: 138236583 Change-Id: I6bca5cf28c54d58476240e0e68900a8f08ffe60b --- src/com/android/launcher3/graphics/DragPreviewProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/launcher3/graphics/DragPreviewProvider.java b/src/com/android/launcher3/graphics/DragPreviewProvider.java index 7eb4015bfa..9263a2ac94 100644 --- a/src/com/android/launcher3/graphics/DragPreviewProvider.java +++ b/src/com/android/launcher3/graphics/DragPreviewProvider.java @@ -29,6 +29,7 @@ import android.os.Handler; import android.view.View; import com.android.launcher3.BubbleTextView; +import com.android.launcher3.FastBitmapDrawable; import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.config.FeatureFlags; @@ -87,6 +88,9 @@ public class DragPreviewProvider { Rect bounds = getDrawableBounds(d); destCanvas.translate(blurSizeOutline / 2 - bounds.left, blurSizeOutline / 2 - bounds.top); + if (d instanceof FastBitmapDrawable) { + ((FastBitmapDrawable) d).setScale(1); + } d.draw(destCanvas); } else { final Rect clipRect = mTempRect;