Remove window container from empty task when destroying.
Previously, the window container was being removed whenever we were
removing the task in a destroy mode. However, this caused issues
where an activity may still be present in the task record, leading to
a subequent change to limit this to tasks with overlays. This led to
the situation where the window container would not be destroyed when
it was supposed to, such as moving an activity to recents, but
This changelist addresses the issue by always removing the window
container from tasks when removed from their parent stack in a
destroy mode and empty. In the recents flow, this will fire and
cleanup when the activity is destroyed.
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackTests
(cherry picked from commit 840c566d13b8c84ad5edb37006176d6731bad250)
3 files changed