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
diff --git a/src/com/android/launcher3/DropTargetBar.java b/src/com/android/launcher3/DropTargetBar.java
index 98ecf3a..bb6d8b0 100644
--- a/src/com/android/launcher3/DropTargetBar.java
+++ b/src/com/android/launcher3/DropTargetBar.java
@@ -23,7 +23,6 @@
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
-import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
@@ -31,13 +30,10 @@
import android.view.ViewPropertyAnimator;
import android.widget.FrameLayout;
-import androidx.annotation.NonNull;
-
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.dragndrop.DragController;
import com.android.launcher3.dragndrop.DragController.DragListener;
import com.android.launcher3.dragndrop.DragOptions;
-import com.android.launcher3.testing.shared.TestProtocol;
/*
* The top bar containing various drop targets: Delete/App Info/Uninstall.
@@ -299,9 +295,6 @@
}
public void animateToVisibility(boolean isVisible) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "8");
- }
if (mVisible != isVisible) {
mVisible = isVisible;
@@ -328,9 +321,6 @@
*/
@Override
public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "7");
- }
animateToVisibility(true);
}
@@ -354,16 +344,4 @@
public ButtonDropTarget[] getDropTargets() {
return getVisibility() == View.VISIBLE ? mDropTargets : new ButtonDropTarget[0];
}
-
- @Override
- protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
- super.onVisibilityChanged(changedView, visibility);
- if (TestProtocol.sDebugTracing) {
- if (visibility == VISIBLE) {
- Log.d(TestProtocol.NO_DROP_TARGET, "9");
- } else {
- Log.d(TestProtocol.NO_DROP_TARGET, "Hiding drop target", new Exception());
- }
- }
- }
}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 59f56ff..4f69ee7 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1828,9 +1828,6 @@
}
private void setWorkspaceLoading(boolean value) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "running: setWorkspaceLoading=" + value);
- }
mWorkspaceLoading = value;
}
@@ -2203,10 +2200,6 @@
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()) {
@@ -2227,10 +2220,6 @@
// pages being hidden in single panel.
result.add(pairId);
}
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NULL_INT_SET, "getPagesToBindSynchronously (2): "
- + result);
- }
return result;
}
@@ -2252,14 +2241,11 @@
/**
* Refreshes the shortcuts shown on the workspace.
- *
+ * <p>
* Implementation of the method from LauncherModel.Callbacks.
*/
public void startBinding() {
Object traceToken = TraceHelper.INSTANCE.beginSection("startBinding");
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "running: startBinding");
- }
// Floating panels (except the full widget sheet) are associated with individual icons. If
// we are starting a fresh bind, close all such panels as all the icons are about
// to go away.
@@ -2438,10 +2424,6 @@
throw (new RuntimeException(desc));
} else {
getModelWriter().deleteItemFromDatabase(item, desc);
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON,
- TAG + "bindItems failed for item=" + item);
- }
continue;
}
}
@@ -2727,14 +2709,11 @@
/**
* Callback saying that there aren't any more items to bind.
- *
+ * <p>
* Implementation of the method from LauncherModel.Callbacks.
*/
public void finishBindingItems(IntSet pagesBoundFirst) {
Object traceToken = TraceHelper.INSTANCE.beginSection("finishBindingItems");
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "running: finishBindingItems");
- }
mWorkspace.restoreInstanceStateForRemainingPages();
setWorkspaceLoading(false);
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 06ac44a..aca58d5 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -375,12 +375,6 @@
public void addCallbacks(@NonNull final Callbacks callbacks) {
Preconditions.assertUIThread();
synchronized (mCallbacksList) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NULL_INT_SET, "addCallbacks pointer: "
- + callbacks
- + ", name: "
- + callbacks.getClass().getName(), new Exception());
- }
mCallbacksList.add(callbacks);
}
}
diff --git a/src/com/android/launcher3/SessionCommitReceiver.java b/src/com/android/launcher3/SessionCommitReceiver.java
index 32c8968..aaccb7d 100644
--- a/src/com/android/launcher3/SessionCommitReceiver.java
+++ b/src/com/android/launcher3/SessionCommitReceiver.java
@@ -24,14 +24,12 @@
import android.content.pm.PackageManager;
import android.os.UserHandle;
import android.text.TextUtils;
-import android.util.Log;
import androidx.annotation.WorkerThread;
import com.android.launcher3.logging.FileLog;
import com.android.launcher3.model.ItemInstallQueue;
import com.android.launcher3.pm.InstallSessionHelper;
-import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.Executors;
/**
@@ -53,9 +51,6 @@
private static void processIntent(Context context, Intent intent) {
if (!isEnabled(context)) {
// User has decided to not add icons on homescreen.
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " not enabled");
- }
return;
}
@@ -64,9 +59,6 @@
if (!PackageInstaller.ACTION_SESSION_COMMITTED.equals(intent.getAction())
|| info == null || user == null) {
// Invalid intent.
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " invalid intent");
- }
return;
}
@@ -75,15 +67,6 @@
|| info.getInstallReason() != PackageManager.INSTALL_REASON_USER
|| packageInstallerCompat.promiseIconAddedForId(info.getSessionId())) {
packageInstallerCompat.removePromiseIconId(info.getSessionId());
- if (TestProtocol.sDebugTracing) {
- int id = info.getSessionId();
- Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG
- + ", TextUtils.isEmpty=" + TextUtils.isEmpty(info.getAppPackageName())
- + ", info.getInstallReason()=" + info.getInstallReason()
- + ", INSTALL_REASON_USER=" + PackageManager.INSTALL_REASON_USER
- + ", icon added=" + packageInstallerCompat.promiseIconAddedForId(id)
- );
- }
return;
}
diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java
index 5368397..328d769 100644
--- a/src/com/android/launcher3/dragndrop/DragController.java
+++ b/src/com/android/launcher3/dragndrop/DragController.java
@@ -21,7 +21,6 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.util.Log;
import android.view.DragEvent;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -35,7 +34,6 @@
import com.android.launcher3.logging.InstanceId;
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.TouchController;
import com.android.launcher3.views.ActivityContext;
@@ -150,9 +148,6 @@
float initialDragViewScale,
float dragViewScaleOnDrop,
DragOptions options) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "4");
- }
return startDrag(drawable, /* view= */ null, originalView, dragLayerX, dragLayerY,
source, dragInfo, dragOffset, dragRegion, initialDragViewScale, dragViewScaleOnDrop,
options);
@@ -210,9 +205,6 @@
DragOptions options);
protected void callOnDragStart() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "6");
- }
if (mOptions.preDragCondition != null) {
mOptions.preDragCondition.onPreDragEnd(mDragObject, true /* dragStarted*/);
}
diff --git a/src/com/android/launcher3/dragndrop/LauncherDragController.java b/src/com/android/launcher3/dragndrop/LauncherDragController.java
index 75f4ad6..0e8b0a5 100644
--- a/src/com/android/launcher3/dragndrop/LauncherDragController.java
+++ b/src/com/android/launcher3/dragndrop/LauncherDragController.java
@@ -24,7 +24,6 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.View;
@@ -37,7 +36,6 @@
import com.android.launcher3.R;
import com.android.launcher3.accessibility.DragViewStateAnnouncer;
import com.android.launcher3.model.data.ItemInfo;
-import com.android.launcher3.testing.shared.TestProtocol;
/**
* Drag controller for Launcher activity
@@ -67,9 +65,6 @@
float initialDragViewScale,
float dragViewScaleOnDrop,
DragOptions options) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "5");
- }
if (PROFILE_DRAWING_DURING_DRAG) {
android.os.Debug.startMethodTracing("Launcher");
}
diff --git a/src/com/android/launcher3/model/AddWorkspaceItemsTask.java b/src/com/android/launcher3/model/AddWorkspaceItemsTask.java
index 0d978e1..27d1f78 100644
--- a/src/com/android/launcher3/model/AddWorkspaceItemsTask.java
+++ b/src/com/android/launcher3/model/AddWorkspaceItemsTask.java
@@ -20,7 +20,6 @@
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.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 @@
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 @@
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 @@
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 @@
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 @@
// 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;
}
diff --git a/src/com/android/launcher3/model/BaseLauncherBinder.java b/src/com/android/launcher3/model/BaseLauncherBinder.java
index 358992e..c946e2c 100644
--- a/src/com/android/launcher3/model/BaseLauncherBinder.java
+++ b/src/com/android/launcher3/model/BaseLauncherBinder.java
@@ -34,7 +34,6 @@
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.shared.TestProtocol;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.LooperExecutor;
@@ -258,20 +257,8 @@
ArrayList<LauncherAppWidgetInfo> currentAppWidgets = new ArrayList<>();
ArrayList<LauncherAppWidgetInfo> otherAppWidgets = new ArrayList<>();
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NULL_INT_SET, "bind (1) currentScreenIds: "
- + currentScreenIds
- + ", pointer: "
- + mCallbacks
- + ", name: "
- + mCallbacks.getClass().getName());
- }
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();
@@ -279,9 +266,6 @@
sortWorkspaceItemsSpatially(idp, otherWorkspaceItems);
// Tell the workspace that we're about to start binding items
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "scheduling: startBinding");
- }
executeCallbacksTask(c -> {
c.clearPendingBinds();
c.startBinding();
@@ -302,9 +286,6 @@
Executor pendingExecutor = pendingTasks::add;
bindWorkspaceItems(otherWorkspaceItems, pendingExecutor);
bindAppWidgets(otherAppWidgets, pendingExecutor);
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "scheduling: finishBindingItems");
- }
executeCallbacksTask(c -> c.finishBindingItems(currentScreenIds), pendingExecutor);
pendingExecutor.execute(
() -> {
diff --git a/src/com/android/launcher3/model/ItemInstallQueue.java b/src/com/android/launcher3/model/ItemInstallQueue.java
index 69f9b53..fa0511c 100644
--- a/src/com/android/launcher3/model/ItemInstallQueue.java
+++ b/src/com/android/launcher3/model/ItemInstallQueue.java
@@ -49,7 +49,6 @@
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.shortcuts.ShortcutRequest;
-import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.MainThreadInitializedObject;
import com.android.launcher3.util.PersistedItemArray;
import com.android.launcher3.util.Preconditions;
@@ -119,18 +118,10 @@
Launcher launcher = Launcher.ACTIVITY_TRACKER.getCreatedActivity();
if (launcher == null) {
// Launcher not loaded
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON,
- LOG + " flushQueueInBackground launcher not loaded");
- }
return;
}
ensureQueueLoaded();
if (mItems.isEmpty()) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON,
- LOG + " flushQueueInBackground no items to load");
- }
return;
}
@@ -140,10 +131,6 @@
// Add the items and clear queue
if (!installQueue.isEmpty()) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON,
- LOG + " flushQueueInBackground launcher addAndBindAddedWorkspaceItems");
- }
// add log
launcher.getModel().addAndBindAddedWorkspaceItems(installQueue);
}
@@ -204,10 +191,6 @@
// Queue the item up for adding if launcher has not loaded properly yet
MODEL_EXECUTOR.post(() -> {
Pair<ItemInfo, Object> itemInfo = info.getItemInfo(mContext);
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " queuePendingShortcutInfo"
- + ", itemInfo=" + itemInfo);
- }
if (itemInfo == null) {
FileLog.d(LOG,
"Adding PendingInstallShortcutInfo with no attached info to queue.",
diff --git a/src/com/android/launcher3/model/ModelUtils.java b/src/com/android/launcher3/model/ModelUtils.java
index 48fb537..bc51c9b 100644
--- a/src/com/android/launcher3/model/ModelUtils.java
+++ b/src/com/android/launcher3/model/ModelUtils.java
@@ -15,11 +15,8 @@
*/
package com.android.launcher3.model;
-import android.util.Log;
-
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.model.data.ItemInfo;
-import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
@@ -34,8 +31,6 @@
*/
public class ModelUtils {
- private static final String TAG = "ModelUtils";
-
/**
* Filters the set of items who are directly or indirectly (via another container) on the
* specified screen.
@@ -55,10 +50,6 @@
(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);
diff --git a/src/com/android/launcher3/pm/InstallSessionHelper.java b/src/com/android/launcher3/pm/InstallSessionHelper.java
index 47bfe85..cb3c16c 100644
--- a/src/com/android/launcher3/pm/InstallSessionHelper.java
+++ b/src/com/android/launcher3/pm/InstallSessionHelper.java
@@ -25,7 +25,6 @@
import android.os.Process;
import android.os.UserHandle;
import android.text.TextUtils;
-import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -36,7 +35,6 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.logging.FileLog;
import com.android.launcher3.model.ItemInstallQueue;
-import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.MainThreadInitializedObject;
@@ -156,16 +154,6 @@
if (sessionInfo == null
|| sessionInfo.getInstallerPackageName() == null
|| TextUtils.isEmpty(sessionInfo.getAppPackageName())) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " verify"
- + ", info=" + (sessionInfo == null)
- + ", info install name" + (sessionInfo == null
- ? null
- : sessionInfo.getInstallerPackageName())
- + ", empty pkg name" + TextUtils.isEmpty((sessionInfo == null
- ? null
- : sessionInfo.getAppPackageName())));
- }
return null;
}
return isTrustedPackage(sessionInfo.getInstallerPackageName(), getUserHandle(sessionInfo))
@@ -224,13 +212,6 @@
*/
@WorkerThread
void tryQueuePromiseAppIcon(@Nullable final PackageInstaller.SessionInfo sessionInfo) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " tryQueuePromiseAppIcon"
- + ", SessionCommitReceiveEnabled" + SessionCommitReceiver.isEnabled(mAppContext)
- + ", verifySessionInfo(sessionInfo)=" + verifySessionInfo(sessionInfo)
- + ", !promiseIconAdded=" + (sessionInfo != null
- && !promiseIconAddedForId(sessionInfo.getSessionId())));
- }
if (SessionCommitReceiver.isEnabled(mAppContext)
&& verifySessionInfo(sessionInfo)
&& !promiseIconAddedForId(sessionInfo.getSessionId())) {
@@ -246,20 +227,6 @@
}
public boolean verifySessionInfo(@Nullable final PackageInstaller.SessionInfo sessionInfo) {
- if (TestProtocol.sDebugTracing) {
- boolean appNotInstalled = sessionInfo == null
- || !new PackageManagerHelper(mAppContext)
- .isAppInstalled(sessionInfo.getAppPackageName(), getUserHandle(sessionInfo));
- boolean labelNotEmpty = sessionInfo != null
- && !TextUtils.isEmpty(sessionInfo.getAppLabel());
- Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " verifySessionInfo"
- + ", verify(sessionInfo)=" + verify(sessionInfo)
- + ", reason=" + (sessionInfo == null ? null : sessionInfo.getInstallReason())
- + ", PackageManager.INSTALL_REASON_USER=" + PackageManager.INSTALL_REASON_USER
- + ", hasIcon=" + (sessionInfo != null && sessionInfo.getAppIcon() != null)
- + ", label is ! empty=" + labelNotEmpty
- + " +, app not installed=" + appNotInstalled);
- }
return verify(sessionInfo) != null
&& sessionInfo.getInstallReason() == PackageManager.INSTALL_REASON_USER
&& sessionInfo.getAppIcon() != null
diff --git a/src/com/android/launcher3/pm/InstallSessionTracker.java b/src/com/android/launcher3/pm/InstallSessionTracker.java
index aeaa320..41908d3 100644
--- a/src/com/android/launcher3/pm/InstallSessionTracker.java
+++ b/src/com/android/launcher3/pm/InstallSessionTracker.java
@@ -25,14 +25,12 @@
import android.content.pm.PackageInstaller.SessionInfo;
import android.os.Build;
import android.os.UserHandle;
-import android.util.Log;
import android.util.SparseArray;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;
-import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.PackageUserKey;
import java.lang.ref.WeakReference;
@@ -70,19 +68,10 @@
public void onCreated(final int sessionId) {
InstallSessionHelper helper = mWeakHelper.get();
Callback callback = mWeakCallback.get();
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON, "Session created sessionId=" + sessionId
- + ", callback=" + callback
- + ", helper=" + helper);
- }
if (callback == null || helper == null) {
return;
}
SessionInfo sessionInfo = pushSessionDisplayToLauncher(sessionId, helper, callback);
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.MISSING_PROMISE_ICON, "Session created sessionId=" + sessionId
- + ", sessionInfo=" + sessionInfo);
- }
if (sessionInfo != null) {
callback.onInstallSessionCreated(PackageInstallInfo.fromInstallingState(sessionInfo));
}
diff --git a/src/com/android/launcher3/secondarydisplay/SecondaryDragController.java b/src/com/android/launcher3/secondarydisplay/SecondaryDragController.java
index 9bf2764..b1a9b86 100644
--- a/src/com/android/launcher3/secondarydisplay/SecondaryDragController.java
+++ b/src/com/android/launcher3/secondarydisplay/SecondaryDragController.java
@@ -20,7 +20,6 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.View;
@@ -37,7 +36,6 @@
import com.android.launcher3.dragndrop.DragView;
import com.android.launcher3.dragndrop.DraggableView;
import com.android.launcher3.model.data.ItemInfo;
-import com.android.launcher3.testing.shared.TestProtocol;
/**
* Drag controller for Secondary Launcher activity
@@ -55,11 +53,6 @@
DraggableView originalView, int dragLayerX, int dragLayerY, DragSource source,
ItemInfo dragInfo, Point dragOffset, Rect dragRegion, float initialDragViewScale,
float dragViewScaleOnDrop, DragOptions options) {
-
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "5");
- }
-
if (PROFILE_DRAWING_DURING_DRAG) {
android.os.Debug.startMethodTracing("Launcher");
}
diff --git a/src/com/android/launcher3/util/ViewOnDrawExecutor.java b/src/com/android/launcher3/util/ViewOnDrawExecutor.java
index 3fa5799..c2767be 100644
--- a/src/com/android/launcher3/util/ViewOnDrawExecutor.java
+++ b/src/com/android/launcher3/util/ViewOnDrawExecutor.java
@@ -16,13 +16,11 @@
package com.android.launcher3.util;
-import android.util.Log;
import android.view.View;
import android.view.View.OnAttachStateChangeListener;
import android.view.ViewTreeObserver.OnDrawListener;
import com.android.launcher3.Launcher;
-import com.android.launcher3.testing.shared.TestProtocol;
import java.util.function.Consumer;
@@ -44,9 +42,6 @@
private boolean mCancelled;
public ViewOnDrawExecutor(RunnableList tasks) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "Initialize ViewOnDrawExecutor");
- }
mTasks = tasks;
}
@@ -54,11 +49,6 @@
mOnClearCallback = launcher::clearPendingExecutor;
mAttachedView = launcher.getWorkspace();
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "ViewOnDrawExecutor.attachTo: launcher=" + launcher
- + ", isAttachedToWindow=" + mAttachedView.isAttachedToWindow());
- }
-
mAttachedView.addOnAttachStateChangeListener(this);
if (mAttachedView.isAttachedToWindow()) {
@@ -67,10 +57,6 @@
}
private void attachObserver() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING,
- "ViewOnDrawExecutor.attachObserver: mCompleted=" + mCompleted);
- }
if (!mCompleted) {
mAttachedView.getViewTreeObserver().addOnDrawListener(this);
}
@@ -78,9 +64,6 @@
@Override
public void onViewAttachedToWindow(View v) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "ViewOnDrawExecutor.onViewAttachedToWindow");
- }
attachObserver();
}
@@ -89,19 +72,11 @@
@Override
public void onDraw() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "ViewOnDrawExecutor.onDraw");
- }
mFirstDrawCompleted = true;
mAttachedView.post(this);
}
public void onLoadAnimationCompleted() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING,
- "ViewOnDrawExecutor.onLoadAnimationCompleted: mAttachedView != null="
- + (mAttachedView != null));
- }
mLoadAnimationCompleted = true;
if (mAttachedView != null) {
mAttachedView.post(this);
@@ -110,12 +85,6 @@
@Override
public void run() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING,
- "ViewOnDrawExecutor.run: mLoadAnimationCompleted=" + mLoadAnimationCompleted
- + ", mFirstDrawCompleted=" + mFirstDrawCompleted
- + ", mCompleted=" + mCompleted);
- }
// Post the pending tasks after both onDraw and onLoadAnimationCompleted have been called.
if (mLoadAnimationCompleted && mFirstDrawCompleted && !mCompleted) {
markCompleted();
@@ -126,12 +95,6 @@
* Executes all tasks immediately
*/
public void markCompleted() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING,
- "ViewOnDrawExecutor.markCompleted: mCancelled=" + mCancelled
- + ", mOnClearCallback != null=" + (mOnClearCallback != null)
- + ", mAttachedView != null=" + (mAttachedView != null));
- }
if (!mCancelled) {
mTasks.executeAllAndDestroy();
}
@@ -146,9 +109,6 @@
}
public void cancel() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.FLAKY_BINDING, "ViewOnDrawExecutor.cancel");
- }
mCancelled = true;
markCompleted();
}
diff --git a/src/com/android/launcher3/widget/BaseWidgetSheet.java b/src/com/android/launcher3/widget/BaseWidgetSheet.java
index 4d38464..049131e 100644
--- a/src/com/android/launcher3/widget/BaseWidgetSheet.java
+++ b/src/com/android/launcher3/widget/BaseWidgetSheet.java
@@ -24,7 +24,6 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
@@ -136,9 +135,6 @@
@Override
public boolean onLongClick(View v) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "1");
- }
TestLogging.recordEvent(TestProtocol.SEQUENCE_MAIN, "Widgets.onLongClick");
v.cancelLongPress();
if (!ItemLongClickListener.canStartDrag(mActivityContext)) return false;
@@ -220,9 +216,6 @@
}
private boolean beginDraggingWidget(WidgetCell v) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "2");
- }
// Get the widget preview as the drag representation
WidgetImageView image = v.getWidgetView();
diff --git a/src/com/android/launcher3/widget/PendingItemDragHelper.java b/src/com/android/launcher3/widget/PendingItemDragHelper.java
index 2dedd12..410a555 100644
--- a/src/com/android/launcher3/widget/PendingItemDragHelper.java
+++ b/src/com/android/launcher3/widget/PendingItemDragHelper.java
@@ -22,7 +22,6 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.util.Log;
import android.util.Size;
import android.view.View;
import android.view.View.MeasureSpec;
@@ -43,7 +42,6 @@
import com.android.launcher3.icons.FastBitmapDrawable;
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.icons.RoundDrawableWrapper;
-import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.widget.dragndrop.AppWidgetHostViewDragListener;
import com.android.launcher3.widget.util.WidgetSizes;
@@ -97,9 +95,6 @@
*/
public void startDrag(Rect previewBounds, int previewBitmapWidth, int previewViewWidth,
Point screenPos, DragSource source, DragOptions options) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_DROP_TARGET, "3");
- }
final Launcher launcher = Launcher.getLauncher(mView.getContext());
LauncherAppState app = LauncherAppState.getInstance(launcher);