mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Merge "make sure all type of Item in DumpTarget contains component and package name b/36904684" into ub-launcher3-dorval
This commit is contained in:
committed by
Android (Google) Code Review
commit
2a120d448e
@@ -19,6 +19,7 @@ import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.android.launcher3.ItemInfo;
|
||||
import com.android.launcher3.LauncherAppWidgetInfo;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.model.nano.LauncherDumpProto;
|
||||
import com.android.launcher3.model.nano.LauncherDumpProto.ContainerType;
|
||||
@@ -40,11 +41,6 @@ public class DumpTargetWrapper {
|
||||
children = new ArrayList<>();
|
||||
}
|
||||
|
||||
public DumpTargetWrapper(DumpTarget t) {
|
||||
this();
|
||||
node = t;
|
||||
}
|
||||
|
||||
public DumpTargetWrapper(int containerType, int id) {
|
||||
this();
|
||||
node = newContainerTarget(containerType, id);
|
||||
@@ -138,7 +134,13 @@ public class DumpTargetWrapper {
|
||||
public DumpTarget writeToDumpTarget(ItemInfo info) {
|
||||
node.component = info.getTargetComponent() == null? "":
|
||||
info.getTargetComponent().flattenToString();
|
||||
node.packageName = info.getIntent() == null? "": info.getIntent().getPackage();
|
||||
node.packageName = info.getTargetComponent() == null? "":
|
||||
info.getTargetComponent().getPackageName();
|
||||
if (info instanceof LauncherAppWidgetInfo) {
|
||||
node.component = ((LauncherAppWidgetInfo) info).providerName.flattenToString();
|
||||
node.packageName = ((LauncherAppWidgetInfo) info).providerName.getPackageName();
|
||||
}
|
||||
|
||||
node.gridX = info.cellX;
|
||||
node.gridY = info.cellY;
|
||||
node.spanX = info.spanX;
|
||||
|
||||
Reference in New Issue
Block a user