From 90d24f4b9b65119f4419824b79bd408be6b86eed Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Thu, 30 Sep 2021 17:23:12 +0100 Subject: [PATCH] Switch to rest state when display changes Fix: 199463580 Test: Unfold device from overview (both from app and from home), overview should close Change-Id: I7786f3ec46857075e123fa2a093c7b55ca616fc1 --- .../src/com/android/launcher3/BaseQuickstepLauncher.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java index a68322d5cd..088009a857 100644 --- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java @@ -631,11 +631,10 @@ public abstract class BaseQuickstepLauncher extends Launcher @Override public void onDisplayInfoChanged(Context context, DisplayController.Info info, int flags) { super.onDisplayInfoChanged(context, info, flags); - // When changing screens with live tile active, finish the recents animation to close - // overview as it should be an interim state - if ((flags & CHANGE_ACTIVE_SCREEN) != 0 && ENABLE_QUICKSTEP_LIVE_TILE.get()) { - RecentsView recentsView = getOverviewPanel(); - recentsView.finishRecentsAnimation(/* toRecents= */ true, null); + // When changing screens, force moving to rest state similar to StatefulActivity.onStop, as + // StatefulActivity isn't called consistently. + if ((flags & CHANGE_ACTIVE_SCREEN) != 0) { + getStateManager().moveToRestState(); } }