Add surface changed callbacks to ViewRootImpl

Allow SurfaceView to be notified when the ViewRootImpl surface changes, is created or
destroyed. The callbacks include a SurfaceControl Transaction object which can be used to
synchronize SurfaceControl changes by the system.

In particular, the transaction will be used to update the relative z order of the SurfaceView
surface when the ViewRootImpl surface changes. WMS is responsible for providing ViewRootImpl a
new surface as well as reparenting its children (SurfaceViews). The transaction will be applied by
the service when it is ready to show the new surface, synchronizing the reparenting with the
relative z update.

Bug: 132205507
Test: go/wm-smoke
Change-Id: Ie5aed430d09cc6d3a0a99f618094b3a50dbaa5cc
1 file changed