From 8f692ef01a8ca95e87af317ff1fa6f0b75f6e616 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Tue, 27 Oct 2020 22:32:33 +0800 Subject: [PATCH] Finish fixed rotation of recents if it is invisible The recents animation may be finished due to device is going to sleep, and then the recents activity will be invisible so there won't be a transition finish callback due to no visibility change when cleaning up recents animation. So if recents activity was invisible before finishing animation, just follow the current display orientation and reset the fixed rotation states. Bug: 171264143 Test: atest RecentsAnimationControllerTest# \ testClearFixedRotationLaunchingAppAfterCleanupAnimation Change-Id: Ic2028b5e1d960d1dcebbc1a56f44f93326335d57 (cherry picked from commit 9f72932f9d35cebcd128987f88b24293e5c7f1d4) --- .../com/android/server/wm/DisplayContent.java | 3 ++- .../server/wm/RecentsAnimationControllerTest.java | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 946d797b8348d..6e662a7232ea3 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -5703,7 +5703,8 @@ class DisplayContent extends WindowContainer