fix: Conflict incoming changes from 15-dev

This commit is contained in:
Pun Butrach
2025-11-22 17:14:31 +07:00
parent 14e352c827
commit 2e76c99dad
1726 changed files with 146971 additions and 95028 deletions
+19 -7
View File
@@ -20,15 +20,17 @@ import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import androidx.annotation.Nullable;
import com.android.launcher3.accessibility.DragViewStateAnnouncer;
import com.android.launcher3.dagger.LauncherComponentProvider;
import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.dragndrop.DragView;
import com.android.launcher3.dragndrop.DraggableView;
import com.android.launcher3.folder.FolderNameProvider;
import com.android.launcher3.folder.FolderNameSuggestionLoader;
import com.android.launcher3.logging.InstanceId;
import com.android.launcher3.logging.InstanceIdSequence;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.util.Executors;
/**
* Interface defining an object that can receive a drag.
@@ -72,7 +74,7 @@ public interface DropTarget {
public DragViewStateAnnouncer stateAnnouncer;
public FolderNameProvider folderNameProvider;
public FolderNameSuggestionLoader folderNameSuggestionLoader;
/** The source view (ie. icon, widget etc.) that is being dragged and which the
* DragView represents. May be an actual View class or a virtual stand-in */
@@ -82,8 +84,8 @@ public interface DropTarget {
public final InstanceId logInstanceId = new InstanceIdSequence().newInstanceId();
public DragObject(Context context) {
Executors.MODEL_EXECUTOR.post(() ->
folderNameProvider = FolderNameProvider.newInstance(context));
folderNameSuggestionLoader = LauncherComponentProvider.get(context)
.getFolderNameSuggestionLoader();
}
/**
@@ -147,8 +149,18 @@ public interface DropTarget {
// These methods are implemented in Views
void getHitRectRelativeToDragLayer(Rect outRect);
/** Returns the drop target view. By default, the implementor class is cast to the view. */
default View getDropView() {
/**
* Returns the drop target view.<br>
*
* By default, the implementor class is cast to the view.<br>
*
* The returned {@link View} will be use to map touch coordinates to the view self descendant
* and set as [{@link DragObject#x DragObject.x} {@link DragObject#y DragObject.y}].<br>
*
* If this method returns {@code null}, the raw touch event coordinates will be directly
* assigned to [{@link DragObject#x DragObject.x} and {@link DragObject#y DragObject.y}].
*/
default @Nullable View getDropView() {
return (View) this;
}
}