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
Loading
Please register or sign in to comment