Fix VTS failure HidlHalGTest#CameraHidlTest.takePictureFail_32bit
Bug: 64449008
Test: VTS VtsHalCameraProviderV2_4Target all pass
Change-Id: I5357d933acbb19c05a32bbd5f778ee3f44fd4042
(cherry picked from commit a74cba4ec122a017f2531c72f9e6209a3ac7b205)
diff --git a/camera/EmulatedCamera.cpp b/camera/EmulatedCamera.cpp
index 66cadee..4761386 100755
--- a/camera/EmulatedCamera.cpp
+++ b/camera/EmulatedCamera.cpp
@@ -545,26 +545,14 @@
}
return NO_ERROR;
} else {
- /* Start camera device for the picture frame. */
- res = camera_dev->startDevice(width, height, org_fmt);
- if (res != NO_ERROR) {
- return res;
- }
-
- /* Deliver one frame only. */
- mCallbackNotifier.setTakingPicture(true);
- res = camera_dev->startDeliveringFrames(true);
- if (res != NO_ERROR) {
- mCallbackNotifier.setTakingPicture(false);
- }
- return res;
+ ALOGE("%s: preview has not been enabled", __FUNCTION__);
+ return EINVAL;
}
}
status_t EmulatedCamera::cancelPicture()
{
ALOGV("%s", __FUNCTION__);
-
return NO_ERROR;
}
diff --git a/camera/EmulatedCamera.h b/camera/EmulatedCamera.h
index ece97cc..6df76b7 100755
--- a/camera/EmulatedCamera.h
+++ b/camera/EmulatedCamera.h
@@ -301,6 +301,7 @@
status_t getConfiguredPixelFormat(uint32_t* pixelFormat) const;
status_t getConfiguredFrameSize(int* width, int* height) const;
+
/****************************************************************************
* Camera API callbacks as defined by camera_device_ops structure.
* See hardware/libhardware/include/hardware/camera.h for information on