{
int ret = CAMERA_ERROR_NONE;
int device_type;
- int client_fd = -1;
int pid = 0;
bool camera_feature_supported = false;
void *gdbus_connection = NULL;
LOGD("device type : %d, client pid : %d", device_type, pid);
- /* privilege check */
- client_fd = muse_core_client_get_msg_fd(module);
- if (!muse_core_security_check_cynara(client_fd, CAMERA_PRIVILEGE_NAME)) {
- ret = CAMERA_ERROR_PERMISSION_DENIED;
- LOGE("security check failed 0x%x", ret);
- muse_camera_msg_return(api, class, ret, module);
- return MUSE_CAMERA_ERROR_INVALID;
- }
-
/* init handle */
muse_camera = (muse_camera_handle_s *)malloc(sizeof(muse_camera_handle_s));
if (muse_camera == NULL) {
int camera_dispatcher_start_preview(muse_module_h module)
{
int ret = CAMERA_ERROR_NONE;
+ int client_fd = -1;
muse_camera_handle_s *muse_camera = NULL;
muse_camera_api_e api = MUSE_CAMERA_API_START_PREVIEW;
muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
LOGD("handle : %p", muse_camera);
+ /* privilege check */
+ client_fd = muse_core_client_get_msg_fd(module);
+ if (!muse_core_security_check_cynara(client_fd, CAMERA_PRIVILEGE_NAME)) {
+ ret = CAMERA_ERROR_PERMISSION_DENIED;
+ LOGE("security check failed 0x%x", ret);
+ muse_camera_msg_return(api, class, ret, module);
+ return MUSE_CAMERA_ERROR_INVALID;
+ }
+
ret = legacy_camera_start_preview(muse_camera->camera_handle);
muse_camera_msg_return(api, class, ret, module);