mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Revert "Add logging to help debug additional app infos being updated by CacheDataUpdatedTask"" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1973056e40
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user