Skip to content
Commit 0dd47a2d authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Accept occluded closing non-embedded change for embedded transition

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
parent 7dd18dd3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment