Add logs for getFocusedTaskHeightForTablet

Bug: 336660988
Bug: 360724626
Test: presubmit
Flag: TEST_ONLY
Change-Id: I67d4fc8211f24b77566bd24525d23054dfdded6e
diff --git a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
index b4b8c5b..1ac45fb 100644
--- a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
+++ b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
@@ -1,6 +1,7 @@
 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;
@@ -8,6 +9,7 @@
 import android.content.res.Resources;
 import android.graphics.Rect;
 import android.os.Bundle;
+import android.util.Log;
 
 import androidx.annotation.Nullable;
 
@@ -78,12 +80,25 @@
             }
 
             case TestProtocol.REQUEST_GET_FOCUSED_TASK_HEIGHT_FOR_TABLET: {
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH,
+                        "=== REQUEST_GET_FOCUSED_TASK_HEIGHT_FOR_TABLET ===");
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "isTablet: " + mDeviceProfile.isTablet);
                 if (!mDeviceProfile.isTablet) {
                     return null;
                 }
                 Rect focusedTaskRect = new Rect();
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "widthPx: " + mDeviceProfile.widthPx);
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "heightPx: " + mDeviceProfile.heightPx);
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "insets: " + mDeviceProfile.getInsets());
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "overviewTaskThumbnailTopMarginPx: "
+                        + mDeviceProfile.overviewTaskThumbnailTopMarginPx);
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "overviewActionsClaimedSpace: "
+                        + mDeviceProfile.getOverviewActionsClaimedSpace());
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH,
+                        "overviewGridSideMargin: " + mDeviceProfile.overviewGridSideMargin);
                 LauncherActivityInterface.INSTANCE.calculateTaskSize(mContext, mDeviceProfile,
                         focusedTaskRect, RecentsPagedOrientationHandler.PORTRAIT);
+                Log.d(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH, "focusedTaskRect: " + focusedTaskRect);
                 response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, focusedTaskRect.height());
                 return response;
             }
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 3f4a73a..8b774fe 100644
--- a/tests/multivalentTests/shared/com/android/launcher3/testing/shared/TestProtocol.java
+++ b/tests/multivalentTests/shared/com/android/launcher3/testing/shared/TestProtocol.java
@@ -173,6 +173,7 @@
     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 e71b49f..cf6b02a 100644
--- a/tests/tapl/com/android/launcher3/tapl/BaseOverview.java
+++ b/tests/tapl/com/android/launcher3/tapl/BaseOverview.java
@@ -23,6 +23,8 @@
 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;
@@ -533,9 +535,13 @@
             return null;
         }
         int focusedTaskHeight = mLauncher.getFocusedTaskHeightForTablet();
+        testLogD(OVERVIEW_FOCUS_TASK_HEIGHT_MISMATCH,
+                "getFocusedTaskForTablet: " + focusedTaskHeight);
         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;
             }