.set_callbacks = camera_set_callbacks,
.get_vendor_tag_ops = camera_get_vendor_tag_ops,
.open_legacy = camera_open_legacy,
- .set_torch_mode = NULL,
+ .set_torch_mode = camera_set_torch_mode,
.init = NULL,
.reserved = {0},
};
return 0;
return camera2_device_open(module, id, device);
}
+
+static int camera_set_torch_mode(const char* camera_id, bool enabled)
+{
+ ALOGV("%s", __FUNCTION__);
+ if (check_vendor_module())
+ return 0;
+ return gVendorModule->set_torch_mode(camera_id, enabled);
+}
static int camera_set_callbacks(const camera_module_callbacks_t *callbacks);
static void camera_get_vendor_tag_ops(vendor_tag_ops_t* ops);
static int camera_open_legacy(const struct hw_module_t* module, const char* id, uint32_t halVersion, struct hw_device_t** device);
+static int camera_set_torch_mode(const char* camera_id, bool enabled);