summaryrefslogtreecommitdiff
path: root/camera/common/1.0/default/CameraModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'camera/common/1.0/default/CameraModule.cpp')
-rw-r--r--camera/common/1.0/default/CameraModule.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/camera/common/1.0/default/CameraModule.cpp b/camera/common/1.0/default/CameraModule.cpp
index 5d9ae4d31a..3a4bc9c6a8 100644
--- a/camera/common/1.0/default/CameraModule.cpp
+++ b/camera/common/1.0/default/CameraModule.cpp
@@ -369,9 +369,11 @@ int CameraModule::getNumberOfCameras() {
}
int CameraModule::setCallbacks(const camera_module_callbacks_t *callbacks) {
- int res;
+ int res = OK;
ATRACE_BEGIN("camera_module->set_callbacks");
- res = mModule->set_callbacks(callbacks);
+ if (getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_1) {
+ res = mModule->set_callbacks(callbacks);
+ }
ATRACE_END();
return res;
}