From 7b5b8cfbcf77b06c12e741e246aaa521bdb89d9d Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Tue, 23 Jun 2020 23:11:22 +0800 Subject: Use rotation animation for orientation change of non-occluded activity If there will have orientation change on existing visible activity, it is better to use rotation animation to cover it, otherwise it may look as a obvious jump cut. Also clear fixed rotation launching app if it is removed from display to ensure the fading animation of system bars can finish. Bug: 159707982 Bug: 159099239 Test: DisplayContentTests#testApplyTopFixedRotationTransform DisplayContentTests#testRecentsNotRotatingWithFixedRotation Change-Id: I01b6ddf97e9d1025685e6f14f0c05f3a9cc95cfa --- .../core/java/com/android/server/wm/DisplayContent.java | 15 +++++++++++++++ .../src/com/android/server/wm/ActivityRecordTests.java | 1 + .../src/com/android/server/wm/AppWindowTokenTests.java | 1 + .../src/com/android/server/wm/DisplayContentTests.java | 10 ++++++++++ .../src/com/android/server/wm/SizeCompatTests.java | 1 + 5 files changed, 28 insertions(+) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index ed055eb7eb09..bfaf9ca90689 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -1184,6 +1184,9 @@ class DisplayContent extends WindowContainer