From e48deacbd4fed1fd0c6b3128bb407d7fb21f5343 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Mon, 12 May 2025 08:47:50 -0700 Subject: [PATCH] Revert "Prevent CtS invocation in fake landscape mode" This reverts commit 299576a77761e2a9db11ef50d7e0072d079e381c. Reason for revert: b/402037577 Change-Id: I240ffd68ccf3536d80eda1c63395c64c8e48de22 --- .../quickstep/util/ContextualSearchInvoker.kt | 13 +------------ .../quickstep/util/ContextualSearchInvokerTest.java | 11 ----------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/quickstep/src/com/android/quickstep/util/ContextualSearchInvoker.kt b/quickstep/src/com/android/quickstep/util/ContextualSearchInvoker.kt index d00a39cd8c..724fa404a2 100644 --- a/quickstep/src/com/android/quickstep/util/ContextualSearchInvoker.kt +++ b/quickstep/src/com/android/quickstep/util/ContextualSearchInvoker.kt @@ -161,11 +161,7 @@ internal constructor( statsLogManager.logger().log(LAUNCHER_LAUNCH_OMNI_FAILED_NOT_AVAILABLE) return false } - if (isFakeLandscape()) { - // TODO (b/383421642): Fake landscape is to be removed in 25Q3 and this entire block - // can be removed when that happens. - return false - } + return true } @@ -201,13 +197,6 @@ internal constructor( return true } - private fun isFakeLandscape(): Boolean = - getRecentsContainerInterface() - ?.getCreatedContainer() - ?.getOverviewPanel>() - ?.getPagedOrientationHandler() - ?.isLayoutNaturalToLauncher == false - private fun isInSplitscreen(): Boolean { return topTaskTracker.getRunningSplitTaskIds().isNotEmpty() } diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/util/ContextualSearchInvokerTest.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/util/ContextualSearchInvokerTest.java index 61971b1fc8..88774be33c 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/util/ContextualSearchInvokerTest.java +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/util/ContextualSearchInvokerTest.java @@ -52,7 +52,6 @@ import com.android.quickstep.BaseContainerInterface; import com.android.quickstep.DeviceConfigWrapper; import com.android.quickstep.SystemUiProxy; import com.android.quickstep.TopTaskTracker; -import com.android.quickstep.orientation.RecentsPagedOrientationHandler; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.RecentsViewContainer; @@ -83,7 +82,6 @@ public class ContextualSearchInvokerTest { private @Mock BaseContainerInterface mMockContainerInterface; private @Mock RecentsViewContainer mMockRecentsViewContainer; private @Mock RecentsView mMockRecentsView; - private @Mock RecentsPagedOrientationHandler mMockOrientationHandler; private ContextualSearchInvoker mContextualSearchInvoker; @Before @@ -191,15 +189,6 @@ public class ContextualSearchInvokerTest { verify(mMockStatsLogger).log(LAUNCHER_LAUNCH_OMNI_ATTEMPTED_SPLITSCREEN); } - @Test - public void runContextualSearchInvocationChecksAndLogFailures_isFakeLandscape() { - when(mMockRecentsView.getPagedOrientationHandler()).thenReturn(mMockOrientationHandler); - when(mMockOrientationHandler.isLayoutNaturalToLauncher()).thenReturn(false); - assertFalse("Expect invocation checks to fail in fake landscape.", - mContextualSearchInvoker.runContextualSearchInvocationChecksAndLogFailures()); - verifyNoMoreInteractions(mMockStatsLogManager); - } - @Test public void invokeContextualSearchUncheckedWithHaptic_cssIsAvailable_commitHapticEnabled() { try (AutoCloseable flag = overrideSearchHapticCommitFlag(true)) {