Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a3cb52f authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

Allow intermittent EXITING in PiP states

There are certain special cases where we should
allow advancement to CHANGING_PIP_BOUNDS state
while not being in SCHEDULED_BOUNDS_CHANGE state.

This is because activity restart, for instance, can
trigger advancement to EXITING_PIP at the time when
exit is just scheduled (transition isn't playing yet);
this has been used to send all components a signal to finish
any animations running outside a transition (e.g. physics animator).

However, we can totally animate a PiP bounds change transition
scheduled earlier since sequentiality is guaranteed with transitions.

What this CL allows is the following:
SCHEDULED_BOUNDS_CHANGE -> EXITING_PIP -> CHANGING_PIP_BOUNDS

where the latter triggers resize animation in the relevant component.

Finally, we also setState(EXITING_PIP) when starting to play
exit-via-expand animation to avoid a an error log that we are trying to
go from _non_EXITING_PIP -> EXITED_PIP.

This should be fine to try twice since, the second time will be blocked
if redundant by PipTransitionState.

Bug: 434087237
Flag: EXEMPT bugfix
Test: atest PipTransitionState
Test: atest ActivityEmbeddingCrossUidTests
  #testUntrustedCrossUidActivityEmbeddingRestoreFromPip_succeedWhenAppOptIn
Change-Id: I3ef11f1a30f35268c8d888fc7cd7a18d0b96b8fb
parent 3e8cca45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment