SurfaceControlViewHost: Expose IPC helpers
Use of SurfaceControlViewHost requires the embeder and embedee to
establish a side-channel in order to exchange the SurfacePackage
containing the embedded hierarchy. In recent commits, SurfacePackage
has grown a built in side-channel, useful for exchanging info from
the host back in to the embedee. In this CL we make two of these APIs
public. The general motivation for making them public is as follows:
1. onDetachedFromWindow: While public API provides a manner
to tear down a SurfaceControlViewHost, it seems that almost
every user will have to include an IPC method for this in their
bespoke side-channel. Since it's required for every use case
it seems to make sense to provide some convenience.
2. onConfigurationChanged: At the moment there would be no way
to change the configuration of the remote
SurfaceControlViewHosts. Client apps are instead forced to
create their own configuration update side-channel and recreate
the whole SurfaceControlViewHost each time.
Bug: 200284683
Test: SurfaceControlViewHostTests
Change-Id: I6f33f0953224d7ff60dc819560d54564250bbe3f
2 files changed