summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-07-04 12:49:00 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-07-04 12:51:02 -0700
commitbc1d0774aa3696b019ca5072d6e9de1dec934c33 (patch)
treee9e027efd404f3ef204cbcfdba2daac5578a9127 /src/com/android/launcher3/dragndrop
parentefbfcb838d5ff45d086736041ab82f1ab4ea6c63 (diff)
downloadandroid_packages_apps_Trebuchet-bc1d0774aa3696b019ca5072d6e9de1dec934c33.tar.gz
android_packages_apps_Trebuchet-bc1d0774aa3696b019ca5072d6e9de1dec934c33.tar.bz2
android_packages_apps_Trebuchet-bc1d0774aa3696b019ca5072d6e9de1dec934c33.zip
Fixing clip mask not getting initialized properly.
Before initializing the clip mask, we were calling iconNormalization on the adaptive icon which was changing the bounds of the drawable (only for the first call). Instead setting the bounds of the drawable after icon normalization. Bug: 63010770 Change-Id: I028d1e38a0d8c4001286d343e107637cf307c4a4
Diffstat (limited to 'src/com/android/launcher3/dragndrop')
-rw-r--r--src/com/android/launcher3/dragndrop/DragView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java
index 022b3b8b1..09cfc1eac 100644
--- a/src/com/android/launcher3/dragndrop/DragView.java
+++ b/src/com/android/launcher3/dragndrop/DragView.java
@@ -222,11 +222,11 @@ public class DragView extends FrameLayout {
int w = mBitmap.getWidth();
int h = mBitmap.getHeight();
AdaptiveIconDrawable adaptiveIcon = (AdaptiveIconDrawable) dr;
- adaptiveIcon.setBounds(0, 0, w, h);
float blurSizeOutline = mLauncher.getResources()
.getDimension(R.dimen.blur_size_medium_outline);
float normalizationScale = IconNormalizer.getInstance(mLauncher)
.getScale(adaptiveIcon, null, null, null) * ((w - blurSizeOutline) / w);
+ adaptiveIcon.setBounds(0, 0, w, h);
final Path mask = getMaskPath(adaptiveIcon, normalizationScale);
mFgImageView = setupImageView(adaptiveIcon.getForeground(), normalizationScale);