Add restored tasks with persisted activity to hierarchy
The Activity with persistAcrossReboots mode will be restored and added
into Task while rebooting. However, after the WM hierarchy is unified,
adding Activity to Task will trigger a series of events, such as
relayout and create surface control, which require Task in the
hierarchy. This causes the restore to fail.
The solution here is to add the restored task to the hierarchy as early
as the point of restoration.
Bug: 178782815
Test: atest TaskPersisterTest TaskRecordTests
Change-Id: I604d6c31f49cff959609373f85d177eadebb062b
2 files changed