Do not count closing activity as visible process
Previously, VisibleActivityProcessTracker#hasVisibleActivity can still return true when the only activity of a process is in a playing transition animation (since shell transition only commits invisible until transition is done). That may lead to a timing that background launch check still allows the process with visible window to launch activity. For example, after pressing home key, the closing app may still be able to launch activity at a specific timing after APP_SWITCH_DISALLOW updates to APP_SWITCH_FG_ONLY but the transition is not finished yet. Bug: 396653764 Flag: com.android.window.flags.use_visible_requested_for_process_tracker Test: WindowProcessControllerTests#testComputeProcessActivityState Change-Id: I064ce5cbb140c68d3e1a482980df52ee5d37f361
Loading
Please register or sign in to comment