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
diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java
index 4520672..7d0f858 100644
--- a/src/com/android/launcher3/ButtonDropTarget.java
+++ b/src/com/android/launcher3/ButtonDropTarget.java
@@ -216,8 +216,7 @@
final DragLayer dragLayer = mLauncher.getDragLayer();
final DragView dragView = d.dragView;
final Rect to = getIconRect(d);
- final float scale = (float) to.width() / d.dragView.getMeasuredWidth();
- dragView.disableColorExtraction();
+ final float scale = (float) to.width() / dragView.getMeasuredWidth();
dragView.detachContentView(/* reattachToPreviousParent= */ true);
mDropTargetBar.deferOnDragEnd();
@@ -226,9 +225,6 @@
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,