Remove some usage of IGBPs in the ICamera.
This change removes the usage of IGBPs in ICamera and the surrounding
code where reasonable. This is part of a refactor outline at go/warren-buffers.
BYPASS_IGBP_IGBC_API_REASON: this CL is part of the migration.
Bug: 342197849
Test: atest android.hardware.cts.CameraTest
Flag: com.android.graphics.libgui.flags.wb_libcameraservice
Change-Id: I06fbf42e6a249f3b30266ac5b3dad0bdbc4f585a
diff --git a/camera/tests/CameraZSLTests.cpp b/camera/tests/CameraZSLTests.cpp
index 2740d09..b06f9b4 100644
--- a/camera/tests/CameraZSLTests.cpp
+++ b/camera/tests/CameraZSLTests.cpp
@@ -20,17 +20,18 @@
#include <gtest/gtest.h>
#include <android/content/AttributionSourceState.h>
+#include <android/hardware/ICameraService.h>
#include <binder/ProcessState.h>
-#include <utils/Errors.h>
-#include <utils/Log.h>
-#include <gui/Surface.h>
-#include <gui/SurfaceComposerClient.h>
-#include <camera/CameraParameters.h>
-#include <camera/CameraMetadata.h>
#include <camera/Camera.h>
+#include <camera/CameraMetadata.h>
+#include <camera/CameraParameters.h>
#include <camera/CameraUtils.h>
#include <camera/StringUtils.h>
-#include <android/hardware/ICameraService.h>
+#include <gui/Flags.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
+#include <utils/Errors.h>
+#include <utils/Log.h>
using namespace android;
using namespace android::hardware;
@@ -276,8 +277,11 @@
previewSurface = surfaceControl->getSurface();
ASSERT_TRUE(previewSurface != NULL);
- ASSERT_EQ(NO_ERROR, cameraDevice->setPreviewTarget(
- previewSurface->getIGraphicBufferProducer()));
+ ASSERT_EQ(NO_ERROR, cameraDevice->setPreviewTarget(previewSurface
+#if !WB_LIBCAMERASERVICE_WITH_DEPENDENCIES
+ ->getIGraphicBufferProducer()
+#endif
+ ));
cameraDevice->setPreviewCallbackFlag(
CAMERA_FRAME_CALLBACK_FLAG_CAMCORDER);