Duplicating InstanceId and InstanceIdSequence classes from framework internal package to launcher3.

com.android.internal.logging package is not directly accessible from launcher codebase hence making a duplicate classes until they are moved to common package.

Change-Id: I7c8a9bd89a322fc330b58460e6468ccff933ea44
This commit is contained in:
thiruram
2020-05-04 12:22:22 -07:00
committed by Thiru Ramasamy
parent 36fb598189
commit 59c5f399a6
5 changed files with 182 additions and 3 deletions

View File

@@ -25,6 +25,8 @@ 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.logging.InstanceId;
import com.android.launcher3.logging.InstanceIdSequence;
import com.android.launcher3.model.data.ItemInfo;
/**
@@ -75,6 +77,11 @@ public interface DropTarget {
* DragView represents. May be an actual View class or a virtual stand-in */
public DraggableView originalView = null;
/** Used for matching DROP event with its corresponding DRAG event on the server side. */
final InstanceId mLogInstanceId =
new InstanceIdSequence(1 << 20 /*InstanceId.INSTANCE_ID_MAX*/)
.newInstanceId();
public DragObject(Context context) {
if (FeatureFlags.FOLDER_NAME_SUGGEST.get()) {
folderNameProvider = FolderNameProvider.newInstance(context);