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

Allow finishing activity to transfer starting window

Assume an application launches multiple activities consecutively
in the same task, given as A, B, C. A is an opaque activity that
will start B and finish. B is a translucent activity that will
start C and finish.

The starting window of A won't transfer to B because B is translucent.
Then when C is looking for if there is existing starting window to
reuse, A has become finishing so the starting window won't involve in
transition. So there may be more than one transition.

Also
- Wrap startActivities with defer/continue layout to avoid
  applying intermediate states.
- Move post cleanup of transferring starting window back so the
  visibility can transfer before resetting because the from-activity
  was visible by previous transferring.

That makes the case can have an atomic-like transition so even the last
activity uses overridePendingTransition which may be redundant, the
previous active transition will ignore its request and the animation
will look smoother.

Fixes: 156298440
Test: atest AppWindowTokenTests# \
      testTransferStartingWindowFromFinishingActivity
Test: Use a sample app to simulate above steps. There should not
      have black screen when animating the last activity.
Change-Id: I54b7aa58a46a2f55d505904caa300fd44abd4d41
parent 148fb0e8
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