Loading
Skip home activity in removeUnreachableHiddenTasks
For devices that support multiple displays, when connecting to a new display, a new home activity will be added under the new display. It triggers RecentTasks#removeUnreachableHiddenTasks() to clean up the unreachable hidden tasks, which may also remove the home activity of the old display(eg. when the task on the old display is in fullscreen, the home activity is an unreachable hidden task and therefore, gets removed). This is not a desired behavior because each display is expected to have its own home activity. This change adds a check to avoid removing the home activities in the removeUnreachableHiddenTasks() method. Bug: 274862596 Test: Manual test, make sure that connecting an external display doesn't remove the original home activity. Change-Id: I1b7e8c9706d8b5ab53766779aec63141ca0669ed