Merge "Attach PipSnapshotContentOverlay in PipTransition" into udc-dev am: 83efc2a17a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23374940

Change-Id: I34e4f602094c9bfab05a3aa2910483740743775f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hongwei Wang
2023-05-23 23:45:18 +00:00
committed by Automerger Merge Worker

View File

@@ -53,6 +53,7 @@ import android.os.SystemProperties;
import android.view.Surface;
import android.view.SurfaceControl;
import android.view.WindowManager;
import android.window.TaskSnapshot;
import android.window.TransitionInfo;
import android.window.TransitionRequestInfo;
import android.window.WindowContainerToken;
@@ -875,6 +876,14 @@ public class PipTransition extends PipTransitionController {
} else {
animator.setColorContentOverlay(mContext);
}
} else {
final TaskSnapshot snapshot = PipUtils.getTaskSnapshot(
taskInfo.launchIntoPipHostTaskId, false /* isLowResolution */);
if (snapshot != null) {
// use the task snapshot during the animation, this is for
// launch-into-pip aka. content-pip use case.
animator.setSnapshotContentOverlay(snapshot, sourceHintRect);
}
}
} else if (enterAnimationType == ANIM_TYPE_ALPHA) {
animator = mPipAnimationController.getAnimator(taskInfo, leash, destinationBounds,