From b6465b21184ba985bdb7544b91edea71495ce191 Mon Sep 17 00:00:00 2001 From: Vadim Caen Date: Mon, 10 Feb 2020 15:48:03 +0100 Subject: [PATCH] Use activity rotation to compute delta When computing applying the rotation matrix to the TaskView thumnail, use the rotation of the window configuration instead of the displays. The forced rotation (ag/10176951) does not yet provide overrided values for the display orientation when the requesting app is being forced rotated, which is the case of the launcher. So getDisplay().getRotation() would return the true rotation of the display and not the rotation of the activity. Test: with "adb shell settings put global forced_rotation 1" and ag/10176951 and parents applied 1. Open landscape application 2. Display recents view 3. Check that the thumnail is in the same rotation as the opened application + tests from I060a5dfcbcbb2ac21624d2ac778f76562bd60f40 Bug: 143053092 Bug: 143892437 Change-Id: Iee250459050b3c75dc3b79deed0682f809c7168b --- proguard.flags | 3 +++ .../src/com/android/quickstep/views/TaskThumbnailView.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/proguard.flags b/proguard.flags index 01302cfb54..e556c94466 100644 --- a/proguard.flags +++ b/proguard.flags @@ -48,3 +48,6 @@ -dontwarn android.view.** -dontwarn android.os.** -dontwarn android.graphics.** + +# Ignore warnings for hidden utility classes referenced from the shared lib +-dontwarn com.android.internal.util.** \ No newline at end of file diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java index 49f667ecb7..8ed139269a 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java @@ -54,6 +54,7 @@ import com.android.systemui.plugins.OverviewScreenshotActions; import com.android.systemui.plugins.PluginListener; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.model.ThumbnailData; +import com.android.systemui.shared.system.ConfigurationCompat; /** * A task in the Recents view. @@ -357,7 +358,8 @@ public class TaskThumbnailView extends View implements PluginListener