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:
1 parent
83ba333604
commit
69a8eecdc9
11 files changed
+107
-369
No files matched your search
@@ -18,7 +18,6 @@ package com.android.launcher3;
|
||||
|
||||
import static android.animation.ValueAnimator.areAnimatorsEnabled;
|
||||
|
||||
import static com.android.launcher3.Utilities.getBoundsForViewInDragLayer;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
|
||||
|
||||
import android.animation.Animator;
|
||||
@@ -1071,18 +1070,12 @@ public class CellLayout extends ViewGroup {
|
||||
// Apply local extracted color if the DragView is an AppWidgetHostViewDrawable.
|
||||
View view = dragObject.dragView.getContentView();
|
||||
if (view instanceof LauncherAppWidgetHostView) {
|
||||
Launcher launcher = Launcher.getLauncher(dragObject.dragView.getContext());
|
||||
Launcher launcher = Launcher.getLauncher(getContext());
|
||||
Workspace workspace = launcher.getWorkspace();
|
||||
int screenId = workspace.getIdForScreen(this);
|
||||
int pageId = workspace.getPageIndexForScreenId(screenId);
|
||||
cellToRect(targetCell[0], targetCell[1], spanX, spanY, mTempRect);
|
||||
|
||||
// Now get the rect in drag layer coordinates.
|
||||
getBoundsForViewInDragLayer(launcher.getDragLayer(), this, mTempRect, true,
|
||||
mTmpFloatArray, mTempRectF);
|
||||
Utilities.setRect(mTempRectF, mTempRect);
|
||||
|
||||
((LauncherAppWidgetHostView) view).handleDrag(mTempRect, pageId);
|
||||
((LauncherAppWidgetHostView) view).handleDrag(mTempRect, this, screenId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user