Merge "Drag and drop from the search view on the overview screen." into main

This commit is contained in:
Treehugger Robot
2025-03-11 18:26:48 -07:00
committed by Android (Google) Code Review
8 changed files with 43 additions and 17 deletions
+6 -1
View File
@@ -100,6 +100,7 @@ import java.lang.reflect.Method;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.function.Predicate;
/**
@@ -276,8 +277,12 @@ public final class Utilities {
*/
public static void mapCoordInSelfToDescendant(View descendant, View root, float[] coord) {
sMatrix.reset();
//TODO(b/307488755) when implemented this check should be removed
if (!Objects.equals(descendant.getWindowId(), root.getWindowId())) {
return;
}
View v = descendant;
while(v != root) {
while (v != root) {
sMatrix.postTranslate(-v.getScrollX(), -v.getScrollY());
sMatrix.postConcat(v.getMatrix());
sMatrix.postTranslate(v.getLeft(), v.getTop());
@@ -540,7 +540,7 @@ public abstract class DragController<T extends ActivityContext>
accepted = true;
}
}
final View dropTargetAsView = dropTarget instanceof View ? (View) dropTarget : null;
final View dropTargetAsView = dropTarget.getDropView();
dispatchDropComplete(dropTargetAsView, accepted);
}