From e291c7d0a708cf080a568e3fe234bbbeae366da9 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Wed, 10 Jun 2020 22:58:20 +0800 Subject: [PATCH] Finish fixed rotation of recents until transition is done With gesture navigation, while swiping up a landscape activity a bit and give up the swipe to return to original activity, the portrait recents activity may still perform relayout before it becomes invisible. If the fixed rotated configuration is cleared too early, the out configuration of relayout will be the same as current display which is landscape. That causes an unexpected Activity#onConfigurationChanged is called. If home is the recents, the symptom may be that the widgets are reloaded. Fixes: 157651692 Test: atest RecentsAnimationControllerTest# \ testRecentViewInFixedPortraitWhenTopAppInLandscape Change-Id: I3fde61a6914ca9abf704e737c089101b32cac3aa --- .../java/com/android/server/wm/DisplayContent.java | 8 ++++++-- .../server/wm/RecentsAnimationControllerTest.java | 14 +++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 4e19a5224bb4f..8b60292efb16b 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -5647,8 +5647,12 @@ class DisplayContent extends WindowContainer