Destroy activity if task is removed directly
Otherwise the activity is unreachable from hierarchy but WindowProcessController still references to the activity. - Task#removeImmediately will go super.removeImmediately so its children's removeImmediately will also be called. That is the place to destroy activity. - Avoid reentrant of Task#removeImmediately because it is confusing to see multiple wm_task_removed with different reasons, e.g. [deleteRootTask, setTaskOrganizer] and [removeTask, cleanUpResourcesForDestroy]. And it also eliminates duplicated invocation of super.removeImmediately. - Add validation for setLaunchRoot. Bug: 177633638 Test: ActivityRecordTests#testRemoveImmediately Change-Id: I762f0a720d1709bb72deaacd857d5e79ce48d1b2
Loading
Please register or sign in to comment