libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingController.java
+44
−5
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Launch flow:
a. A translucent host activity.
b. Create 2 split TaskFragment.
c. Move the host into one split and put a new activity on another.
The changes will have:
2 OPEN [embedded]TaskFragment
1 CHANGE [embedded]ActivityRecord
1 CLOSE Task
The CLOSE task was visible because the host is translucent.
Then after trigger embedded split, it is occluded by the
embedded activities.
Previously, ActivityEmbeddingController rejected to animate
if the transition contain one non-embedded change. Then it
will go default transition handler to apply weird animation.
Because the CLOSE Task is simply occluded, the needed operation
is to hide its surface by finishTransaction. Hence simply
ignore it and let ActivityEmbeddingController animate the
embedded changes.
Also make the screenshot of CHANGE non-opaque if the container
is translucent, so the CLOSE Task won't disappear suddenly due
to the opaque layer above.
Fix: 271818877
Test: atest ActivityEmbeddingControllerTests# \
testStartAnimation_containsNonActivityEmbeddingChange
Change-Id: I13781969b8e515a3bf33cc93ee8d4e302548bcbd