Synchronize screen turning on and unfold overlay

Changes unfold overlay implementation from a window
to surface control view host. To make sure that the
unfold overlay is drawn by the time when we remove
screen blocker we synchronously apply a transaction
with drawn overlay and apply another empty transaction
with vsyncId+1.

Also these changes disable the unfold transition when
using power button by filtering only first screen turning
on events after unfolding the device.

Bug: 197538198
Test: manual fold/unfolds
Test: killing SysUI process, checking rotation animation, magnification
Test: atest com.android.systemui.unfold.updates.DeviceFoldStateProviderTest
Change-Id: Ia4147413153a1a2fa62624ef057e712bff0d9042
1 file changed