Wait for relaunching activity to finish sync
Otherwise the sync group may be finished too early and then the
animation will start too early.
E.g. when changing wallpaper (theme color), sometimes it may triggers
multiple CONFIG_ASSETS_PATHS changes. The sequence could be
config_change_1 -> drawn_1 (finish sync)
-> config_change_2 -> animation starts by 1 -> drawn_2.
Then if the activity is relaunching without preserving window and
the animation finishes before "drawn_2" happens, it will show
black screen.
Bug: 282200672
Test: atest SyncEngineTests#testWaitingSyncCallback
Change-Id: I044f194150dee563f9df5e93f19a47bd8f384c6a
2 files changed