Resets PiP snap fraction on AppWindowToken removal

We previously rely on both windowing mode change and activity stopped
signals to reset the PiP snap fraction. The windowing mode change signal
is sent too early from WM to SysUI when we have default bounds
calculation migrated to SysUI.

Certain PinnedStackTests cases become flaky when we soly depend on
activity stopped signal to reset the fraction. For instance,

testEnterPictureInPictureDiscardSavedPositionOnFinish

- Test-1 started PiP with shelf open
- Snap fraction X is saved from Test-1
- Test-2 launches PiP above NO_RELAUNCH_ACTIVITY, with shelf closed

Instead of using the default bounds, Test-2 uses fraction X saved from
Test-1 which is shifted up by shelf height.

The saved fraction does not get reset in this case since the test
activities are force killed after each run and no activity stopped
signal is sent.

Bug: 139015463
Test: atest PinnedStackTests
Change-Id: I5720dc3abcfc78a92bb118ae35fc25d922c6232a
1 file changed