Remove unused debug logs

Removing debug logs for bugs that have already been closed. These logs are filling up the logcat buffer and impeding in other test investigations.

Flag: not needed
Test: Tapl tests
Bug: 260260325
Change-Id: I4d69b904f2ea79d758cf6bef7d90d172f2eb2a91
This commit is contained in:
Schneider Victor-tulias
2023-04-10 15:59:23 -07:00
parent 47f2dd6a11
commit fff7cef9f1
20 changed files with 5 additions and 289 deletions

View File

@@ -20,7 +20,6 @@ import android.content.pm.LauncherActivityInfo;
import android.content.pm.LauncherApps;
import android.content.pm.PackageInstaller.SessionInfo;
import android.os.UserHandle;
import android.util.Log;
import android.util.Pair;
import androidx.annotation.NonNull;
@@ -39,7 +38,6 @@ import com.android.launcher3.model.data.WorkspaceItemFactory;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.pm.InstallSessionHelper;
import com.android.launcher3.pm.PackageInstallInfo;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.PackageManagerHelper;
@@ -97,20 +95,12 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
item.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT) {
// Short-circuit this logic if the icon exists somewhere on the workspace
if (shortcutExists(dataModel, item.getIntent(), item.user)) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON,
LOG + " Item already on workspace.");
}
continue;
}
// b/139663018 Short-circuit this logic if the icon is a system app
if (PackageManagerHelper.isSystemApp(app.getContext(),
Objects.requireNonNull(item.getIntent()))) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON,
LOG + " Item is a system app.");
}
continue;
}
}
@@ -150,9 +140,6 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
String packageName = item.getTargetComponent() != null
? item.getTargetComponent().getPackageName() : null;
if (packageName == null) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " Null packageName.");
}
continue;
}
SessionInfo sessionInfo = packageInstaller.getActiveSessionInfo(item.user,
@@ -161,9 +148,6 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
if (!packageInstaller.verifySessionInfo(sessionInfo)) {
FileLog.d(LOG, "Item info failed session info verification. "
+ "Skipping : " + workspaceInfo);
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + "Failed verification.");
}
continue;
}
@@ -174,9 +158,6 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
if (sessionInfo == null) {
if (!hasActivity) {
// Session was cancelled, do not add.
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + "Session cancelled");
}
continue;
}
} else {
@@ -196,9 +177,6 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
// workspace items as promise icons. At this point we now have the
// correct intent to compare against existing workspace icons.
// Icon already exists on the workspace and should not be auto-added.
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + "shortcutExists");
}
continue;
}