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

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

Revert "Add logging to help debug additional app infos being updated by CacheDataUpdatedTask"

This reverts commit 62511de7.

Reason for revert: bug not reproducing

Fixes: 20747317
Change-Id: I55c1fe8005fee66db53052aab15e152e6d39a34c
parent 50b82f88
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.launcher3.model;

import static com.android.launcher3.model.data.AppInfo.COMPONENT_KEY_COMPARATOR;
import static com.android.launcher3.model.data.AppInfo.EMPTY_ARRAY;
import static com.android.launcher3.testing.shared.TestProtocol.INCORRECT_INFO_UPDATED;

import android.content.ComponentName;
import android.content.Context;
@@ -39,7 +38,6 @@ import com.android.launcher3.model.BgDataModel.Callbacks;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.pm.PackageInstallInfo;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.FlagOp;
import com.android.launcher3.util.PackageManagerHelper;
import com.android.launcher3.util.SafeCloseable;
@@ -275,14 +273,8 @@ public class AllAppsList {
    }

    public void updateIconsAndLabels(HashSet<String> packages, UserHandle user) {
        if (TestProtocol.sDebugTracing) {
            Log.i(INCORRECT_INFO_UPDATED, "updateIconsAndLabels: packages=" + packages);
        }
        for (AppInfo info : data) {
            if (info.user.equals(user) && packages.contains(info.componentName.getPackageName())) {
                if (TestProtocol.sDebugTracing) {
                    Log.i(INCORRECT_INFO_UPDATED, "updateIconsAndLabels: updating info=" + info);
                }
                mIconCache.updateTitleAndIcon(info);
                info.sectionName = mIndex.computeSectionName(info.title);
                mDataChanged = true;
+0 −1
Original line number Diff line number Diff line
@@ -148,7 +148,6 @@ public final class TestProtocol {
    public static final String NULL_INT_SET = "b/200572078";
    public static final String MISSING_PROMISE_ICON = "b/202985412";
    public static final String TASKBAR_IN_APP_STATE = "b/227657604";
    public static final String INCORRECT_INFO_UPDATED = "b/239465630";
    public static final String NPE_TRANSIENT_TASKBAR = "b/257549303";

    public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
+0 −9
Original line number Diff line number Diff line
package com.android.launcher3.model;

import static com.android.launcher3.testing.shared.TestProtocol.INCORRECT_INFO_UPDATED;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
@@ -16,7 +14,6 @@ import android.graphics.Color;
import android.os.Process;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -29,7 +26,6 @@ import com.android.launcher3.icons.cache.CachingLogic;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.LauncherModelHelper;

import org.junit.After;
@@ -47,15 +43,12 @@ import java.util.HashSet;
@RunWith(AndroidJUnit4.class)
public class CacheDataUpdatedTaskTest {

    private static final String TAG = "CacheDataUpdatedTaskTest";

    private static final String NEW_LABEL_PREFIX = "new-label-";

    private LauncherModelHelper mModelHelper;

    @Before
    public void setup() throws Exception {
        TestProtocol.sDebugTracing = true;
        mModelHelper = new LauncherModelHelper();
        mModelHelper.initializeData("cache_data_updated_task_data");

@@ -98,7 +91,6 @@ public class CacheDataUpdatedTaskTest {
    @After
    public void tearDown() {
        mModelHelper.destroy();
        TestProtocol.sDebugTracing = false;
    }

    private CacheDataUpdatedTask newTask(int op, String... pkg) {
@@ -122,7 +114,6 @@ public class CacheDataUpdatedTaskTest {
        // Verify that only app1 var updated in allAppsList
        assertFalse(mModelHelper.getAllAppsList().data.isEmpty());
        for (AppInfo info : mModelHelper.getAllAppsList().data) {
            Log.i(INCORRECT_INFO_UPDATED, "testCacheUpdate_update_apps: checking info=" + info);
            if (info.componentName.getPackageName().equals("app1")) {
                assertFalse(info.bitmap.isNullOrLowRes());
            } else {