Merge "Add logging to help debug b/200572078." into sc-v2-dev am: a246eb4aa5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15925088

Change-Id: I12a777ea9feaa94e1476e73f3d21eb88f3e37b11
This commit is contained in:
TreeHugger Robot
2021-09-30 07:16:20 +00:00
committed by Automerger Merge Worker
4 changed files with 25 additions and 0 deletions
+8
View File
@@ -2132,6 +2132,10 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
IntSet result = new IntSet();
if (visibleIds.isEmpty()) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NULL_INT_SET, "getPagesToBindSynchronously (1): "
+ result);
}
return result;
}
for (int id : orderedScreenIds.toArray()) {
@@ -2152,6 +2156,10 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
// pages being hidden in single panel.
result.add(pairId);
}
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NULL_INT_SET, "getPagesToBindSynchronously (2): "
+ result);
}
return result;
}
@@ -32,6 +32,7 @@ import com.android.launcher3.model.BgDataModel.FixedContainerItems;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.LooperExecutor;
@@ -173,8 +174,18 @@ public abstract class BaseLoaderResults {
ArrayList<LauncherAppWidgetInfo> currentAppWidgets = new ArrayList<>();
ArrayList<LauncherAppWidgetInfo> otherAppWidgets = new ArrayList<>();
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NULL_INT_SET, "bind (1) currentScreenIds: "
+ currentScreenIds
+ ", mCallBacks: "
+ mCallbacks.getClass().getSimpleName());
}
filterCurrentWorkspaceItems(currentScreenIds, mWorkspaceItems, currentWorkspaceItems,
otherWorkspaceItems);
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NULL_INT_SET, "bind (2) currentScreenIds: "
+ currentScreenIds);
}
filterCurrentWorkspaceItems(currentScreenIds, mAppWidgets, currentAppWidgets,
otherAppWidgets);
final InvariantDeviceProfile idp = mApp.getInvariantDeviceProfile();
@@ -31,6 +31,7 @@ import com.android.launcher3.icons.BitmapInfo;
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
@@ -66,6 +67,10 @@ public class ModelUtils {
(lhs, rhs) -> Integer.compare(lhs.container, rhs.container));
for (T info : allWorkspaceItems) {
if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NULL_INT_SET, "filterCurrentWorkspaceItems: "
+ currentScreenIds);
}
if (currentScreenIds.contains(info.screenId)) {
currentScreenItems.add(info);
itemsOnScreen.add(info.id);
@@ -120,4 +120,5 @@ public final class TestProtocol {
public static final String WORK_PROFILE_REMOVED = "b/159671700";
public static final String TASK_VIEW_ID_CRASH = "b/195430732";
public static final String NO_DROP_TARGET = "b/195031154";
public static final String NULL_INT_SET = "b/200572078";
}