mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Adding support for easily extending Launcher DragAndDrop support
Bug: 232165524 Test: Verified locally Change-Id: I3b4f37bc9914de55330662edd678e6fdd0eafece
This commit is contained in:
@@ -35,7 +35,6 @@ import androidx.annotation.VisibleForTesting;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.pm.PackageInstallInfo;
|
||||
import com.android.launcher3.util.ComponentKey;
|
||||
import com.android.launcher3.util.PackageManagerHelper;
|
||||
|
||||
import java.util.Comparator;
|
||||
@@ -43,7 +42,7 @@ import java.util.Comparator;
|
||||
/**
|
||||
* Represents an app in AllAppsView.
|
||||
*/
|
||||
public class AppInfo extends ItemInfoWithIcon {
|
||||
public class AppInfo extends ItemInfoWithIcon implements WorkspaceItemFactory {
|
||||
|
||||
public static final AppInfo[] EMPTY_ARRAY = new AppInfo[0];
|
||||
public static final Comparator<AppInfo> COMPONENT_KEY_COMPARATOR = (a, b) -> {
|
||||
@@ -121,7 +120,8 @@ public class AppInfo extends ItemInfoWithIcon {
|
||||
return super.dumpProperties() + " componentName=" + componentName;
|
||||
}
|
||||
|
||||
public WorkspaceItemInfo makeWorkspaceItem() {
|
||||
@Override
|
||||
public WorkspaceItemInfo makeWorkspaceItem(Context context) {
|
||||
WorkspaceItemInfo workspaceItemInfo = new WorkspaceItemInfo(this);
|
||||
|
||||
if ((runtimeStatusFlags & FLAG_INSTALL_SESSION_ACTIVE) != 0) {
|
||||
@@ -139,10 +139,6 @@ public class AppInfo extends ItemInfoWithIcon {
|
||||
return workspaceItemInfo;
|
||||
}
|
||||
|
||||
public ComponentKey toComponentKey() {
|
||||
return new ComponentKey(componentName, user);
|
||||
}
|
||||
|
||||
public static Intent makeLaunchIntent(LauncherActivityInfo info) {
|
||||
return makeLaunchIntent(info.getComponentName());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user