Merge "Clean-up debug logs" into main
This commit is contained in:
@@ -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.taskbar.TaskbarActivityContext;
|
||||
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 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,6 @@ public final class TestProtocol {
|
||||
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";
|
||||
|
||||
|
||||
@@ -23,11 +23,9 @@ import static com.android.launcher3.tapl.LauncherInstrumentation.log;
|
||||
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 @@ public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
|
||||
|
||||
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 @@ public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user