Merge "Stub out most of TouchInteractionService for Go" into ub-launcher3-master
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
index a84d230..1ed1353 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
@@ -50,11 +50,7 @@
 public final class FallbackActivityControllerHelper implements
         ActivityControlHelper<RecentsActivity> {
 
-    private final ComponentName mHomeComponent;
-
-    public FallbackActivityControllerHelper(ComponentName homeComponent) {
-        mHomeComponent = homeComponent;
-    }
+    public FallbackActivityControllerHelper() { }
 
     @Override
     public void onTransitionCancelled(RecentsActivity activity, boolean activityVisible) {
diff --git a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
index b6741f4..724a492 100644
--- a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
+++ b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
@@ -96,7 +96,7 @@
         } else {
             // The default home app is a different launcher. Use the fallback Overview instead.
             overviewComponent = new ComponentName(mContext, RecentsActivity.class);
-            mActivityControlHelper = new FallbackActivityControllerHelper(defaultHome);
+            mActivityControlHelper = new FallbackActivityControllerHelper();
             overviewIntentCategory = Intent.CATEGORY_DEFAULT;
 
             // User's default home app can change as a result of package updates of this app (such
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 4b7d8b4..00da6fa 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -1024,8 +1024,8 @@
             return;
         }
 
-        if (amount < 0) {
-            super.scrollTo(amount, getScrollY());
+        if (overScrollAmount < 0) {
+            super.scrollTo(overScrollAmount, getScrollY());
         } else {
             super.scrollTo(mMaxScrollX + overScrollAmount, getScrollY());
         }
diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
index 33cb5be..6f2f280 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -110,7 +110,11 @@
 
     public static void initialize(AbstractLauncherUiTest test) throws Exception {
         test.clearLauncherData();
-        test.mDevice.pressHome();
+        if (TestHelpers.isInLauncherProcess()) {
+            test.mActivityMonitor.returnToHome();
+        } else {
+            test.mDevice.pressHome();
+        }
         test.waitForLauncherCondition("Launcher didn't start", launcher -> launcher != null);
         test.waitForState("Launcher internal state didn't switch to Home", LauncherState.NORMAL);
         test.waitForResumed("Launcher internal state is still Background");