Add APIs to move suggestions below/above window
Based on feedback from developers (GBoard) there are cases
where they want the app UI to cover the suggestions during
animations (keypress popup should cover the suggestion area).
This change adds a dedicated InlineContentView that is
returned when a suggestion is inflated. This view has APIs
to dynamically move its surface above/below the host window.
Also the new InlineContentView has no public constructors
as these are always created by the system via other APIs.
Finally, the InlineContentView only exposes the surface
control of the inlined UI which is useful for reparenting
to achieve clipping of multiple such views in a given area
on the screen.
When the content surface is below the app window it is not
be interactive and all touches go to the hosting app. In this
state the app can draw on top of the suggestions. When the
content surface is above the app window it is interactive
and the hosting app cannot render on top of it.
While at this this also fixes the case where a surface can
cover the suggestion surface even if it was on top of the
app window. Now if the embedded content surface is covered,
even partially, by another one the embedded UI is not
interactive.
bug:15140337
Test: atest AutofillTestCases
Change-Id: I68577b9fb2aab07c07e28ce2d5436d7de5d1d763
1 file changed