Fix dragging icon badge offset

Bug: 143702640
Test: Manual
Change-Id: I86d97c1f0ea02c86f4bf745a8bdda3887c62f27e
This commit is contained in:
Samuel Fufa
2019-11-05 15:29:10 -08:00
parent f788bbb0c4
commit 37b2489ff7

View File

@@ -584,7 +584,7 @@ public final class Utilities {
LauncherIcons li = LauncherIcons.obtain(appState.getContext());
Bitmap badge = li.getShortcutInfoBadge(si, appState.getIconCache()).iconBitmap;
li.recycle();
float badgeSize = iconSize * LauncherIcons.getBadgeSizeForIconSize(iconSize);
float badgeSize = LauncherIcons.getBadgeSizeForIconSize(iconSize);
float insetFraction = (iconSize - badgeSize) / iconSize;
return new InsetDrawable(new FastBitmapDrawable(badge),
insetFraction, insetFraction, 0, 0);