Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00213384 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias
Browse files

Add logging to help debug b/200572078.

Bug: 200572078
Test: ran launcher and checked logs
Change-Id: If59d850021df226d645aa6a72da2b5bb7ec63782
parent 03be5344
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -2124,6 +2124,10 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche


        IntSet result = new IntSet();
        IntSet result = new IntSet();
        if (visibleIds.isEmpty()) {
        if (visibleIds.isEmpty()) {
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.NULL_INT_SET, "getPagesToBindSynchronously (1): "
                        + result);
            }
            return result;
            return result;
        }
        }
        for (int id : orderedScreenIds.toArray()) {
        for (int id : orderedScreenIds.toArray()) {
@@ -2144,6 +2148,10 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
            // pages being hidden in single panel.
            // pages being hidden in single panel.
            result.add(pairId);
            result.add(pairId);
        }
        }
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.NULL_INT_SET, "getPagesToBindSynchronously (2): "
                    + result);
        }
        return result;
        return result;
    }
    }


+11 −0
Original line number Original line Diff line number Diff line
@@ -32,6 +32,7 @@ import com.android.launcher3.model.BgDataModel.FixedContainerItems;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.LooperExecutor;
import com.android.launcher3.util.LooperExecutor;
@@ -173,8 +174,18 @@ public abstract class BaseLoaderResults {
            ArrayList<LauncherAppWidgetInfo> currentAppWidgets = new ArrayList<>();
            ArrayList<LauncherAppWidgetInfo> currentAppWidgets = new ArrayList<>();
            ArrayList<LauncherAppWidgetInfo> otherAppWidgets = 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,
            filterCurrentWorkspaceItems(currentScreenIds, mWorkspaceItems, currentWorkspaceItems,
                    otherWorkspaceItems);
                    otherWorkspaceItems);
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.NULL_INT_SET, "bind (2) currentScreenIds: "
                        + currentScreenIds);
            }
            filterCurrentWorkspaceItems(currentScreenIds, mAppWidgets, currentAppWidgets,
            filterCurrentWorkspaceItems(currentScreenIds, mAppWidgets, currentAppWidgets,
                    otherAppWidgets);
                    otherAppWidgets);
            final InvariantDeviceProfile idp = mApp.getInvariantDeviceProfile();
            final InvariantDeviceProfile idp = mApp.getInvariantDeviceProfile();
+5 −0
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.launcher3.icons.BitmapInfo;
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.IntSet;


@@ -66,6 +67,10 @@ public class ModelUtils {
                (lhs, rhs) -> Integer.compare(lhs.container, rhs.container));
                (lhs, rhs) -> Integer.compare(lhs.container, rhs.container));
        for (T info : allWorkspaceItems) {
        for (T info : allWorkspaceItems) {
            if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
            if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
                if (TestProtocol.sDebugTracing) {
                    Log.d(TestProtocol.NULL_INT_SET, "filterCurrentWorkspaceItems: "
                            + currentScreenIds);
                }
                if (currentScreenIds.contains(info.screenId)) {
                if (currentScreenIds.contains(info.screenId)) {
                    currentScreenItems.add(info);
                    currentScreenItems.add(info);
                    itemsOnScreen.add(info.id);
                    itemsOnScreen.add(info.id);
+1 −0
Original line number Original line Diff line number Diff line
@@ -118,4 +118,5 @@ public final class TestProtocol {
    public static final String WORK_PROFILE_REMOVED = "b/159671700";
    public static final String WORK_PROFILE_REMOVED = "b/159671700";
    public static final String TASK_VIEW_ID_CRASH = "b/195430732";
    public static final String TASK_VIEW_ID_CRASH = "b/195430732";
    public static final String NO_DROP_TARGET = "b/195031154";
    public static final String NO_DROP_TARGET = "b/195031154";
    public static final String NULL_INT_SET = "b/200572078";
}
}