Use visible activity for remote animation target if available.
When creating a remote animation target for recents animation, the old
logic choose an activity which becomes visible soon (i.e.
ActivityRecord#mVisibleRequested=true). However, in the following
scenario, activity_b is to-be-visible soon, but doesn't have window yet.
1. activity_a launches activity_b
2. immediately after this, a user starts recents.
In this case, we should use activity_a whose window is already displayed
on the screen even though the activity is to-be-invisible soon.
Bug: 223499269
Bug: 231711212
Test: atest RecentsAnimationControllerTest
Change-Id: Ifeb0a18fe386d1d604e3092728e660ffaf0e6f27
3 files changed