Merge "Handle ActivityEmbedding container in remote transition adapter" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-12-02 18:10:48 +00:00
committed by Android (Google) Code Review

View File

@@ -195,8 +195,16 @@ class RemoteTransitionAdapter {
val out = ArrayList<RemoteAnimationTarget>() val out = ArrayList<RemoteAnimationTarget>()
for (i in info.changes.indices) { for (i in info.changes.indices) {
val change = info.changes[i] val change = info.changes[i]
val changeIsWallpaper = change.flags and TransitionInfo.FLAG_IS_WALLPAPER != 0 if (change.hasFlags(TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY)) {
if (wallpapers != changeIsWallpaper) continue // For embedded container, when the parent Task is also in the transition, we
// should only animate the parent Task.
if (change.parent != null) continue
// For embedded container without parent, we should only animate if it fills
// the Task. Otherwise we may animate only partial of the Task.
if (!change.hasFlags(TransitionInfo.FLAG_FILLS_TASK)) continue
}
// Check if it is wallpaper
if (wallpapers != change.hasFlags(TransitionInfo.FLAG_IS_WALLPAPER)) continue
out.add(createTarget(change, info.changes.size - i, info, t)) out.add(createTarget(change, info.changes.size - i, info, t))
if (leashMap != null) { if (leashMap != null) {
leashMap[change.leash] = out[out.size - 1].leash leashMap[change.leash] = out[out.size - 1].leash