diff options
| author | 2025-03-17 16:14:56 -0700 | |
|---|---|---|
| committer | 2025-03-19 11:02:18 -0700 | |
| commit | 50c77e2c4bd704ded1a523f1969d97072e1c8040 (patch) | |
| tree | 9665b80d571a3242ba6d7301bd7cf7ea47c4fbf3 /libs/androidfw/AssetsProvider.cpp | |
| parent | 7d18bdd71f060d7a18ba903e48a65feea73d4360 (diff) | |
[PiP2]Send config changes after stop upon PiP-exit
Context:
In an effort to have PiP2 rely on Transitions as much as possible,
we had it adhere to Transitions policy on lifecycle and config-changes.
More specifically, with PiP2 we just send configuration updates upon
transition start/end as needed.
Issue:
When an activity's isVisibleRequested=false, Transitions framework skips
the dispatch of config-updates to the client after lifecycle updates
(i.e. onStop). However, PiP needs to follow a contract wherein
onPictureInPictureModeChanged(inPip, newConfig) is dispatched with
the latest new config even after the activity receives onStop.
Solution:
To send config updates for the activity leaving PiP right after
scheduling its stopping. Unlike how it's done in PiP1 with a
special-case force-hidden, we are doing this at the end of the
transition, as our goal is to keep running the remove-PiP animation
as a part of TRANSIT_REMOVE_PIP while the activity is PAUSED.
We can reuse ActivityRecord#updatePictureInPictureMode() for this.
Bug: 403103525
Flag: com.android.wm.shell.enable_pip2
Test: atest PinnedStackTests#testStopBeforeMultiWindowCallbacksOnDismiss
Change-Id: I2f1f7a11fb44dcbcb582d8693089a0893da3d013
Diffstat (limited to 'libs/androidfw/AssetsProvider.cpp')
0 files changed, 0 insertions, 0 deletions