Merge "Revert "Revert "[Overview Actions] Disable swiping for TaskView if it's in select mode.""" into ub-launcher3-master
diff --git a/OWNERS b/OWNERS
index 7340e84..bf4cd0b 100644
--- a/OWNERS
+++ b/OWNERS
@@ -8,9 +8,26 @@
 hyunyoungs@google.com
 mrcasey@google.com
 sunnygoyal@google.com
+awickham@google.com
 twickham@google.com
 winsonc@google.com
 zakcohen@google.com
+santie@google.com
+vadimt@google.com
+mett@google.com
+jonmiranda@google.com
+pinyaoting@google.com
+sfufa@google.com
+gwasserman@google.com
+jamesoleary@google.com
+joshtrask@google.com
+mrenouf@google.com
+mkephart@google.com
+hwwang@google.com
+tracyzhou@google.com
+peanutbutter@google.com
+xuqiu@google.com
+sreyasr@google.com
 
 per-file FeatureFlags.java = sunnygoyal@google.com, adamcohen@google.com
 per-file BaseFlags.java = sunnygoyal@google.com, adamcohen@google.com
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
index 28ed588..03d7c3e 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
@@ -81,8 +81,7 @@
 
     @Test
     public void testAllAppsFromOverview() throws Exception {
-        // When actions are enabled, all apps isn't present in overview
-        if (mLauncher.overviewActionsEnabled()) {
+        if (!mLauncher.hasAllAppsInOverview()) {
             return;
         }
 
@@ -146,7 +145,7 @@
                 launcher -> assertEquals("Dismissing a task didn't remove 1 task from Overview",
                         numTasks - 1, getTaskCount(launcher)));
 
-        if (!mLauncher.overviewActionsEnabled() && (!TestHelpers.isInLauncherProcess()
+        if (mLauncher.hasAllAppsInOverview() && (!TestHelpers.isInLauncherProcess()
                 || getFromLauncher(launcher -> !launcher.getDeviceProfile().isLandscape))) {
             // Test switching to all apps and back.
             final AllAppsFromOverview allApps = overview.switchToAllApps();
@@ -190,8 +189,7 @@
 
     @Test
     public void testAppIconLaunchFromAllAppsFromOverview() throws Exception {
-        // All apps doesn't exist in Overview when actions are enabled
-        if (mLauncher.overviewActionsEnabled()) {
+        if (!mLauncher.hasAllAppsInOverview()) {
             return;
         }
 
diff --git a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
index de9757f..4b1a067 100644
--- a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
@@ -41,6 +41,7 @@
 import com.android.launcher3.util.rule.ShellCommandRule;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -70,12 +71,14 @@
 
     @Test
     @PortraitLandscape
+    @Ignore // b/148867106
     public void testWidgetConfig() throws Throwable {
         runTest(true);
     }
 
     @Test
     @PortraitLandscape
+    @Ignore // b/148867106
     public void testConfigCancelled() throws Throwable {
         runTest(false);
     }
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 4481e9d..b1aab50 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -565,7 +565,7 @@
                     return waitForLauncherObject(APPS_RES_ID);
                 }
                 case OVERVIEW: {
-                    if (mDevice.isNaturalOrientation() && !overviewActionsEnabled()) {
+                    if (hasAllAppsInOverview()) {
                         waitForLauncherObject(APPS_RES_ID);
                     } else {
                         waitUntilGone(APPS_RES_ID);
@@ -1213,7 +1213,24 @@
         getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING);
     }
 
-    public boolean overviewActionsEnabled() {
+    public boolean hasAllAppsInOverview() {
+        // Vertical bar layouts don't contain all apps
+        if (!mDevice.isNaturalOrientation()) {
+            return false;
+        }
+        // Portrait two button (quickstep) always has all apps.
+        if (getNavigationModel() == NavigationModel.TWO_BUTTON) {
+            return true;
+        }
+        // Overview actions hide all apps
+        if (overviewActionsEnabled()) {
+            return false;
+        }
+        // ...otherwise there should be all apps
+        return true;
+    }
+
+    private boolean overviewActionsEnabled() {
         return getTestInfo(TestProtocol.REQUEST_OVERVIEW_ACTIONS_ENABLED).getBoolean(
                 TestProtocol.TEST_INFO_RESPONSE_FIELD);
     }