Harden construction sites of android::Surface.
Since this type is inteded to be managed as a StrongPointer, ensure that
is always constructed as such.
Bug: 393217449
Test: presubmit
Flag: EXEMPT_refactor
Change-Id: Ibbef08ac65feb5508b87ee36269a99d55eb050b7
diff --git a/camera/camera2/CaptureRequest.cpp b/camera/camera2/CaptureRequest.cpp
index d2fcde6..fee322a 100644
--- a/camera/camera2/CaptureRequest.cpp
+++ b/camera/camera2/CaptureRequest.cpp
@@ -118,7 +118,7 @@
#else
sp<Surface> surface;
if (surfaceShim.graphicBufferProducer != NULL) {
- surface = new Surface(surfaceShim.graphicBufferProducer);
+ surface = sp<Surface>::make(surfaceShim.graphicBufferProducer);
}
#endif
mSurfaceList.push_back(surface);