Apply show or hide transaction for InputSurface immediately

Currently, the show or hide is added to a transaction when the
updateInputWindows runnable is executed asynchronously. This could cause
a delay when the input surface is sent to SurfaceFlinger, causing issues
with input that occurs after the input surface is expected to have been
created.

This change applies the show and hide transaction immediately so when
the performDrag returns to the client the surface has already been
added. Since the input surface is not tied to the windows, applying it
doesn't need to be in sync with applying the other transactions.

Bug: 122965081
Test: atest DragDropTest
Change-Id: I90d67116b8e4f15eed4f98a8fa593861164ea0c5
3 files changed