Take screenshot before hiding the WSA.

The WSA can get hidden immediately in setVisibility. When that happens,
the screenshot will not be taken since it occurs right after the WSA was
hidden. Instead take the screenshot first and then hide the WSA.

Fixes: 73419173
Test: Open new app. Enter split screen from long press recents.
Open an app that can't be in split screen, like camera. Go to recents.
First app should show content in recents screenshot.

Change-Id: I928f7845e5f996f2784b44c9e43caa1a9c998f4b
1 file changed