Simplifying drag preview generation

> Fixing wrong icon normalization when dragging a folder icon
> Reusing the preview bitmap for creating dragOutline
> Generating drag outline on the background thread

Bug: 35428783
Change-Id: I01e724ba63404302090ee1e562f6c2fc7147ba2f
This commit is contained in:
Sunny Goyal
2017-09-26 12:43:16 -07:00
parent f00c5b5fd4
commit aa3a2baab6
8 changed files with 151 additions and 225 deletions

View File

@@ -129,7 +129,7 @@ public class WidgetHostViewLoader implements DragController.DragListener {
mWidgetLoadingId = -1;
hostView.setVisibility(View.INVISIBLE);
int[] unScaledSize = mLauncher.getWorkspace().estimateItemSize(mInfo, false, true);
int[] unScaledSize = mLauncher.getWorkspace().estimateItemSize(mInfo);
// We want the first widget layout to be the correct size. This will be important
// for width size reporting to the AppWidgetManager.
DragLayer.LayoutParams lp = new DragLayer.LayoutParams(unScaledSize[0],