From fe35d069d2f3002b383d72eeb7cdbeb3f322be8e Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Mon, 5 Feb 2024 16:02:19 -0800 Subject: [PATCH] Update split with self test since it didn't account for contextual split * Right now we split from all apps and we stay in all apps with contextual split. * We now have 2 paths, if we are in contextual split then we should select the same app from all apps again Fixes: 323418145 Change-Id: I3bde59847b9e47951a6acdc93660b600114c3ddd --- .../quickstep/TaplTestsSplitscreen.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsSplitscreen.java b/quickstep/tests/src/com/android/quickstep/TaplTestsSplitscreen.java index 1e33635a23..c472ef2e3d 100644 --- a/quickstep/tests/src/com/android/quickstep/TaplTestsSplitscreen.java +++ b/quickstep/tests/src/com/android/quickstep/TaplTestsSplitscreen.java @@ -16,6 +16,7 @@ package com.android.quickstep; +import static com.android.launcher3.config.FeatureFlags.enableSplitContextually; import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; @@ -40,6 +41,7 @@ import com.android.wm.shell.Flags; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -103,10 +105,18 @@ public class TaplTestsSplitscreen extends AbstractQuickStepTest { .getSplitScreenMenuItem() .click(); - mLauncher.getLaunchedAppState() - .getTaskbar() - .getAppIcon(CALCULATOR_APP_NAME) - .launchIntoSplitScreen(); + if (enableSplitContextually()) { + // We're staying in all apps, use same instance + mLauncher.getAllApps() + .getAppIcon(CALCULATOR_APP_NAME) + .launch(CALCULATOR_APP_PACKAGE); + } else { + // We're in overview, use taskbar instance + mLauncher.getLaunchedAppState() + .getTaskbar() + .getAppIcon(CALCULATOR_APP_NAME) + .launchIntoSplitScreen(); + } } @Test