Reland "Finish sync for activities under a drawn shared starting window"
If a task contains multiple activities and the top one is translucent, the task may not report sync finish even if the top activity is ready. Because the activity behind is also visible, then the sync group still needs to wait for it. But if the snapshot starting window has drawn, the task should be covered by it. Then all visible activities belonging to the task can be considered as ready to start transition. This can also cover the case of hot launch of embedded activities. About the modification of reland: Change to check mSyncState instead of isSyncFinished to avoid changing a finished sync state. Though after [1], the case should be excluded. Otherwise, the sync transaction may be lost if the container has a sync state without a sync group. [1]: Idd1bc09eb9bdec1a8b0ba44fa34f417f2fa92102 Bug: 296817251 Bug: 317833037 Bug: 318136158 Test: atest SyncEngineTests#testFinishSyncByStartingWindow Test: Activity A starts translucent activity B in the same task and the same process. B will call sleep 1s in onResume. Return to Home and start the task of A. The transition should start in a short time by the starting window. Change-Id: I2b15f6fd6eb7bfb238de102b5e0d29726d194652
Loading
Please register or sign in to comment