diff --git a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
index b290f83..49b6f57 100644
--- a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
+++ b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
@@ -1,16 +1,12 @@
 package com.android.quickstep;
 
 import static com.android.launcher3.taskbar.TaskbarThresholdUtils.getFromNavThreshold;
-import static com.android.launcher3.testing.shared.TestProtocol.OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH;
 import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
 
 import android.app.Activity;
 import android.content.Context;
 import android.content.res.Resources;
-import android.graphics.PointF;
-import android.graphics.Rect;
 import android.os.Bundle;
-import android.util.Log;
 
 import androidx.annotation.Nullable;
 
@@ -18,7 +14,6 @@
 import com.android.launcher3.testing.TestInformationHandler;
 import com.android.launcher3.testing.shared.TestProtocol;
 import com.android.launcher3.util.DisplayController;
-import com.android.quickstep.orientation.RecentsPagedOrientationHandler;
 import com.android.quickstep.util.GroupTask;
 import com.android.quickstep.util.LayoutUtils;
 import com.android.quickstep.util.TISBindHelper;
@@ -82,29 +77,10 @@
             }
 
             case TestProtocol.REQUEST_GET_OVERVIEW_TASK_SIZE: {
-                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "== REQUEST_GET_OVERVIEW_TASK_SIZE ==");
-                Rect gridSize = new Rect();
-                LauncherActivityInterface.INSTANCE.calculateGridSize(mDeviceProfile, mContext,
-                        gridSize);
-                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "gridSize: " + gridSize);
-                PointF taskDimension = new PointF();
-                LauncherActivityInterface.getTaskDimension(mContext, mDeviceProfile, taskDimension);
-                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH,
-                        "taskbarHeight: " + mDeviceProfile.taskbarHeight);
-                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "taskDimension: " + taskDimension);
-                Rect taskSize = new Rect();
-                LauncherActivityInterface.INSTANCE.calculateTaskSize(mContext, mDeviceProfile,
-                        taskSize, RecentsPagedOrientationHandler.PORTRAIT);
-                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "calculateTaskSize: " + taskSize);
                 return getUIProperty(Bundle::putParcelable,
-                        recentsViewContainer -> {
-                            Rect lastComputedTaskSize =
-                                    recentsViewContainer.<RecentsView<?, ?>>getOverviewPanel()
-                                            .getLastComputedTaskSize();
-                            Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH,
-                                    "lastComputedTaskSize: " + lastComputedTaskSize);
-                            return lastComputedTaskSize;
-                        },
+                        recentsViewContainer ->
+                                recentsViewContainer.<RecentsView<?, ?>>getOverviewPanel()
+                                        .getLastComputedTaskSize(),
                         this::getRecentsViewContainer);
             }
 
diff --git a/tests/multivalentTests/shared/com/android/launcher3/testing/shared/TestProtocol.java b/tests/multivalentTests/shared/com/android/launcher3/testing/shared/TestProtocol.java
index a20b0f1..ea58136 100644
--- a/tests/multivalentTests/shared/com/android/launcher3/testing/shared/TestProtocol.java
+++ b/tests/multivalentTests/shared/com/android/launcher3/testing/shared/TestProtocol.java
@@ -171,7 +171,6 @@
     public static final String TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE = "b/326908466";
     public static final String WIDGET_CONFIG_NULL_EXTRA_INTENT = "b/324419890";
     public static final String OVERVIEW_SELECT_TOOLTIP_MISALIGNED = "b/332485341";
-    public static final String OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH = "b/336660988";
     public static final String REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW = "enable-grid-only-overview";
     public static final String REQUEST_FLAG_ENABLE_APP_PAIRS = "enable-app-pairs";
 
diff --git a/tests/tapl/com/android/launcher3/tapl/BaseOverview.java b/tests/tapl/com/android/launcher3/tapl/BaseOverview.java
index ac145b7..0edcfea 100644
--- a/tests/tapl/com/android/launcher3/tapl/BaseOverview.java
+++ b/tests/tapl/com/android/launcher3/tapl/BaseOverview.java
@@ -23,11 +23,9 @@
 import static com.android.launcher3.tapl.OverviewTask.TASK_START_EVENT;
 import static com.android.launcher3.tapl.TestHelpers.getOverviewPackageName;
 import static com.android.launcher3.testing.shared.TestProtocol.NORMAL_STATE_ORDINAL;
-import static com.android.launcher3.testing.shared.TestProtocol.OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH;
 import static com.android.launcher3.testing.shared.TestProtocol.testLogD;
 
 import android.graphics.Rect;
-import android.util.Log;
 import android.view.KeyEvent;
 
 import androidx.annotation.NonNull;
@@ -424,31 +422,32 @@
 
     protected boolean isActionsViewVisible() {
         if (!hasTasks() || isClearAllVisible()) {
-            Log.d(TAG, "Not expecting an actions bar: no tasks/'Clear all' is visible");
+            testLogD(TAG, "Not expecting an actions bar: no tasks/'Clear all' is visible");
             return false;
         }
         boolean isTablet = mLauncher.isTablet();
         if (isTablet && mLauncher.isGridOnlyOverviewEnabled()) {
-            Log.d(TAG, "Not expecting an actions bar: device is tablet with grid-only Overview");
+            testLogD(TAG, "Not expecting an actions bar: device is tablet with grid-only Overview");
             return false;
         }
         OverviewTask task = isTablet ? getFocusedTaskForTablet() : getCurrentTask();
         if (task == null) {
-            Log.d(TAG, "Not expecting an actions bar: no current task");
+            testLogD(TAG, "Not expecting an actions bar: no current task");
             return false;
         }
         // In tablets, if focused task is not in center, overview actions aren't visible.
         if (isTablet && Math.abs(task.getExactCenterX() - mLauncher.getExactScreenCenterX()) >= 1) {
-            Log.d(TAG, "Not expecting an actions bar: device is tablet and task is not centered");
+            testLogD(TAG,
+                    "Not expecting an actions bar: device is tablet and task is not centered");
             return false;
         }
         if (task.isTaskSplit() && (!mLauncher.isAppPairsEnabled() || !isTablet)) {
-            Log.d(TAG, "Not expecting an actions bar: device is phone and task is split");
+            testLogD(TAG, "Not expecting an actions bar: device is phone and task is split");
             // Overview actions aren't visible for split screen tasks, except for save app pair
             // button on tablets.
             return false;
         }
-        Log.d(TAG, "Expecting an actions bar");
+        testLogD(TAG, "Expecting an actions bar");
         return true;
     }
 
@@ -535,13 +534,9 @@
             return null;
         }
         Rect focusTaskSize = mLauncher.getOverviewTaskSize();
-        testLogD(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "focusTaskSize: " + focusTaskSize);
         int focusedTaskHeight = focusTaskSize.height();
         for (UiObject2 task : taskViews) {
             OverviewTask overviewTask = new OverviewTask(mLauncher, task, this);
-
-            testLogD(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH,
-                    "overviewTask.getVisibleHeight(): " + overviewTask.getVisibleHeight());
             if (overviewTask.getVisibleHeight() == focusedTaskHeight) {
                 return overviewTask;
             }
