Don't preload overview if current home isn't gestural overview

During first boot, home activity after FallbackHome may be an
one-time setup. If the overview is preloaded at this moment,
system won't resume the real home after the one-time setup is
finished because the activity stack is not empty.

Since the navigation mode doesn't support gesture during the
first time setup, and in order to keep the ability to preload
launcher if it is also the overview, these conditions are
combined to guard the case of first boot.

Fix: 137281732
Test: Build sdk_gphone_x86-userdebug.
      Run "emulator -wipe-data" and check the
      recents activity won't start during booting.

Change-Id: I4b20f61f4a412371c19b379410c8a0a188e41276
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
index 22c18d0..fd4b394 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
@@ -708,6 +708,10 @@
         if (!mIsUserUnlocked) {
             return;
         }
+        if (!mMode.hasGestures && !mOverviewComponentObserver.isHomeAndOverviewSame()) {
+            // Prevent the overview from being started before the real home on first boot.
+            return;
+        }
 
         final ActivityControlHelper<BaseDraggingActivity> activityControl =
                 mOverviewComponentObserver.getActivityControlHelper();