Add logs for getFocusedTaskHeightForTablet

Bug: 336660988
Bug: 360724626
Test: presubmit
Flag: TEST_ONLY
Change-Id: I67d4fc8211f24b77566bd24525d23054dfdded6e
This commit is contained in:
Alex Chau
2024-08-19 18:52:22 +01:00
parent cafe06f63d
commit d326e17fe2
3 changed files with 22 additions and 0 deletions
@@ -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.Context;
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 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
}
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;
}