mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Merge "Skips checking for overview actions when grid only overview flag is enabled." into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bc6e67da45
@@ -16,6 +16,7 @@
|
||||
package com.android.launcher3.testing;
|
||||
|
||||
import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_TRACKPAD_GESTURE;
|
||||
import static com.android.launcher3.config.FeatureFlags.FOLDABLE_SINGLE_PAGE;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
@@ -253,6 +254,12 @@ public class TestInformationHandler implements ResourceBasedOverride {
|
||||
+ l.getAppsView().getActiveRecyclerView().getPaddingBottom());
|
||||
}
|
||||
|
||||
case TestProtocol.REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW: {
|
||||
response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD,
|
||||
ENABLE_GRID_ONLY_OVERVIEW.get());
|
||||
return response;
|
||||
}
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -167,6 +167,8 @@ public final class TestProtocol {
|
||||
public static final String REQUEST_IS_EMULATE_DISPLAY_RUNNING = "is-emulate-display-running";
|
||||
public static final String REQUEST_EMULATE_PRINT_DEVICE = "emulate-print-device";
|
||||
|
||||
public static final String REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW = "enable-grid-only-overview";
|
||||
|
||||
/** Logs {@link Log#d(String, String)} if {@link #sDebugTracing} is true. */
|
||||
public static void testLogD(String tag, String message) {
|
||||
if (!sDebugTracing) {
|
||||
|
||||
@@ -324,13 +324,16 @@ public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
|
||||
if (!hasTasks() || isClearAllVisible()) {
|
||||
return false;
|
||||
}
|
||||
OverviewTask task = mLauncher.isTablet() ? getFocusedTaskForTablet() : getCurrentTask();
|
||||
boolean isTablet = mLauncher.isTablet();
|
||||
if (isTablet && mLauncher.isGridOnlyOverviewEnabled()) {
|
||||
return false;
|
||||
}
|
||||
OverviewTask task = isTablet ? getFocusedTaskForTablet() : getCurrentTask();
|
||||
if (task == null) {
|
||||
return false;
|
||||
}
|
||||
// In tablets, if focused task is not in center, overview actions aren't visible.
|
||||
if (mLauncher.isTablet()
|
||||
&& Math.abs(task.getExactCenterX() - mLauncher.getExactScreenCenterX()) >= 1) {
|
||||
if (isTablet && Math.abs(task.getExactCenterX() - mLauncher.getExactScreenCenterX()) >= 1) {
|
||||
return false;
|
||||
}
|
||||
// Overview actions aren't visible for split screen tasks.
|
||||
|
||||
@@ -1761,6 +1761,11 @@ public final class LauncherInstrumentation {
|
||||
TestProtocol.TEST_INFO_RESPONSE_FIELD);
|
||||
}
|
||||
|
||||
boolean isGridOnlyOverviewEnabled() {
|
||||
return getTestInfo(TestProtocol.REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW).getBoolean(
|
||||
TestProtocol.TEST_INFO_RESPONSE_FIELD);
|
||||
}
|
||||
|
||||
public void sendPointer(long downTime, long currentTime, int action, Point point,
|
||||
GestureScope gestureScope) {
|
||||
final boolean hasTIS = hasTIS();
|
||||
|
||||
Reference in New Issue
Block a user