From 69ac3349353242e267512119c0c3077cf2f5a647 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Mon, 15 Jul 2019 18:49:06 +0800 Subject: [PATCH] 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 --- .../src/com/android/quickstep/TouchInteractionService.java | 4 ++++ 1 file changed, 4 insertions(+) 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 22c18d0b00..fd4b3940a5 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 @@ public class TouchInteractionService extends Service implements if (!mIsUserUnlocked) { return; } + if (!mMode.hasGestures && !mOverviewComponentObserver.isHomeAndOverviewSame()) { + // Prevent the overview from being started before the real home on first boot. + return; + } final ActivityControlHelper activityControl = mOverviewComponentObserver.getActivityControlHelper();