OSDN Git Service

Remove window container from empty task when destroying.
authorBryce Lee <brycelee@google.com>
Thu, 13 Apr 2017 17:02:51 +0000 (10:02 -0700)
committerBryce Lee <brycelee@google.com>
Thu, 13 Apr 2017 17:16:59 +0000 (10:16 -0700)
commit840c566d13b8c84ad5edb37006176d6731bad250
treec15bd33c76ab34a6b2a70e79102b6d51a96c92a5
parent061db23b79b0f07b3b843e081420fbbcc606b451
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
otherwise destroying.

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.

Change-Id: I87548d6ff8e4d77b6294504d7cc78370cd5d31fa
Fixes: 37301159
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackTests
services/core/java/com/android/server/am/ActivityStack.java
services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java