[PiP2] Find config-at-end activity in AE case
There are cases where an activity is a leaf
in a chain of containers. So whenever we are
retrieving a delay config-at-end activity, we
should not assume it's the direct child of a PiP task change.
More specifically, here, we are dealing with a case of:
Pinned Task > TF (fills the task) > Config-at-End Activity
used by apps such as Whatsapp.
Bug: 402045190
Bug: 402270581
Flag: com.android.wm.shell.enable_pip2
Test: atest SecondaryActivityEnterPipTest
Test: direct enter PiP by back gesture from a Whatsapp call
Test: pinch-resize Whatsapp PiP
Change-Id: Ic51cdac72e7c46ba5c01440a0a6f375b37cc8714
4 files changed