Merge "Use the new Surface API instead of IGBP." into main
diff --git a/services/camera/libcameraservice/device3/Camera3OutputStream.cpp b/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
index 54d55a1..04867b9 100644
--- a/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
+++ b/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
@@ -732,7 +732,11 @@
if (res == OK) {
// Disable buffer allocation for this BufferQueue, buffer manager will take over
// the buffer allocation responsibility.
+#if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_PLATFORM_API_IMPROVEMENTS)
+ mConsumer->allowAllocation(false);
+#else
mConsumer->getIGraphicBufferProducer()->allowAllocation(false);
+#endif
mUseBufferManager = true;
} else {
ALOGE("%s: Unable to register stream %d to camera3 buffer manager, "