Use a SC wrapper when running on background thread

The call that registers a sampling listener happens on the background,
to avoid blocking the main thread. This ca cause the SurfaceControl to
become invalid before we apply it.

Test: atest CompositionSamplingListenerTest
Test: manual
Fixes: 195405459
Change-Id: Iee599b14b905d03c59cb919f70bf2e35144f5a22
1 file changed