Fix Animation for recent apps in the foreground
The fix introduced by ag/26400047 revealed an issue with how foreground tasks are identified. Foreground tasks were marked as the first non-app selector task on the task stack, however it doesnt actually check to see if that task is currently visible on the screen. Now we have a unique animation for the task being on the foreground, we want to ensure that a task being on foreground means it is currently visible on the screen to avoid animation jank.
Bug: 328417244
Test: manual testing
Test: atest com.android.systemui.mediaprojection.appselector.data.ShellRecentTaskListProviderTest
Flag: ACONFIG com.android.systemui.pss_app_selector_abrupt_exit_fix NEXTFOOD
Change-Id: I11a0f57138ecc1f84885467e814a15626d9c5cd1
(cherry picked from commit 97fbb590077875a0882a4b273f907d522fa83bf0)
2 files changed