[1/n] Fix Restart and Resize hints flickering
The flicker was due to a change in the size of the layout when the
hint was displayed. This was triggering a relayout which appeared as
a flicker.
Using a different overload for the SurfaceViewHost#relayout() it's
possible to execute the change in position and resize in the same
transition which happens after the View for the layout has been measured.
This removes the flicker when a long click event happens on a button
to display the tooltip.
Flag: com.android.window.flags.app_compat_async_relayout
Fix: 322463856
Test: atest WMShellUnitTests:CompatUIWindowManagerTest
Test: atest WMShellUnitTests:UserAspectRatioSettingsLayoutTest
Change-Id: I7225f85357b52e3df557ebaceac683e2c4bce2c9
3 files changed