Simplifying color extraction registration logic

> Calulating correct location irrespective of transient
  state (scale/translation)
> Removing extraction pause/resume logic
> Simplifying location calculation and registration (only use one location instead of a list)

Bug: 194732483
Test: Manual
Change-Id: I255d83761bff5e09c9fb0a5e398d0be0c1d0956f
This commit is contained in:
Sunny Goyal
2021-07-22 10:02:50 -07:00
parent 83ba333604
commit 69a8eecdc9
11 changed files with 107 additions and 369 deletions

View File

@@ -217,7 +217,6 @@ public abstract class ButtonDropTarget extends TextView
final DragView dragView = d.dragView;
final Rect to = getIconRect(d);
final float scale = (float) to.width() / dragView.getMeasuredWidth();
dragView.disableColorExtraction();
dragView.detachContentView(/* reattachToPreviousParent= */ true);
mDropTargetBar.deferOnDragEnd();
@@ -225,9 +224,6 @@ public abstract class ButtonDropTarget extends TextView
completeDrop(d);
mDropTargetBar.onDragEnd();
mLauncher.getStateManager().goToState(NORMAL);
// Only re-enable updates once the workspace is back to normal, which will be after the
// current frame.
post(dragView::resumeColorExtraction);
};
dragLayer.animateView(d.dragView, to, scale, 0.1f, 0.1f,