From 54d481dedac60bdc1af5e128c67c66b1d66c45af Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 8 Oct 2021 16:15:06 -0700 Subject: Apply the last recents animation transform on single-activity PIP tasks - When swiping up to enter PIP w/ auto-enter, SysUI applies a transform on the leash which is seamlessly applied to the task (to prevent jumps when the leash is removed). This was intended to be applied in both single and multiple activity PIP cases, but if that doesn't happen, then when the transform is later cleared, it will inadvertently reset the task's crop and matrix. Bug: 201127015 Test: atest PinnedStackTests Test: Open YT, enter PIP, turn screen off, turn screen back on Change-Id: I0d6d46c7c52f7a43058902b50a26131f626ae92d --- services/core/java/com/android/server/wm/RootWindowContainer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java index bd688a618c63..52da4b80a75d 100644 --- a/services/core/java/com/android/server/wm/RootWindowContainer.java +++ b/services/core/java/com/android/server/wm/RootWindowContainer.java @@ -2125,6 +2125,9 @@ class RootWindowContainer extends WindowContainer final Task rootTask; if (singleActivity) { rootTask = task; + + // Apply the last recents animation leash transform to the task entering PIP + rootTask.maybeApplyLastRecentsAnimationTransaction(); } else { // In the case of multiple activities, we will create a new task for it and then // move the PIP activity into the task. Note that we explicitly defer the task -- cgit v1.2.3-59-g8ed1b