summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2021-11-01 21:10:43 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-11-01 21:10:43 +0000
commit5f2b1ca25de82c4dcda3e4de9c703a9a63a629f7 (patch)
treedd0cc939d2a396faf5f7069dc45b6512a57c4fec
parent1cf05649d710d6acf4460248c587e25a1d3a80c2 (diff)
parent096a5c5a8e4878666d4eb0c2098cdfffe4a04626 (diff)
Merge "Avoid conflict surface reset on auto-enter-pip" into sc-v2-dev am: fdf6eedb10 am: 096a5c5a8e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16150706 Change-Id: I5175c20fff4b9a47c7454139e984b7abc7ed3362
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenUnfoldController.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenUnfoldController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenUnfoldController.java
index fc1b704e95ad..aa3868cfca84 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenUnfoldController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenUnfoldController.java
@@ -16,6 +16,7 @@
package com.android.wm.shell.fullscreen;
+import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.util.MathUtils.lerp;
import static android.view.Display.DEFAULT_DISPLAY;
@@ -163,7 +164,10 @@ public final class FullscreenUnfoldController implements UnfoldListener,
public void onTaskVanished(ActivityManager.RunningTaskInfo taskInfo) {
AnimationContext animationContext = mAnimationContextByTaskId.get(taskInfo.taskId);
if (animationContext != null) {
- resetSurface(animationContext);
+ // PiP task has its own cleanup path, ignore surface reset to avoid conflict.
+ if (taskInfo.getWindowingMode() != WINDOWING_MODE_PINNED) {
+ resetSurface(animationContext);
+ }
mAnimationContextByTaskId.remove(taskInfo.taskId);
}