Check camera support feature in camera_get_device_state function 35/162235/2 accepted/tizen/unified/20171211.061300 submit/tizen/20171208.071653
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 30 Nov 2017 00:46:16 +0000 (09:46 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 7 Dec 2017 09:25:40 +0000 (18:25 +0900)
[Version] 0.3.9
[Profile] Common
[Issue Type] Update
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-unified_20171128.5]

Change-Id: I6ef5e8c47095c446904cb0e21a2b8fb7786877b0
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
muse/src/muse_camera_dispatcher.c
packaging/mmsvc-camera.spec

index 9c507e0..5e2f602 100644 (file)
@@ -1556,7 +1556,7 @@ int camera_dispatcher_create(muse_module_h module)
                LOGE("failed to get platform info for camera support");
 
        if (!camera_feature_supported) {
-               LOGE("CAMERA NOT SUPPORTED, BUT INI FILE FOR CMAERA IS EXISTED. RECOMMEND TO REMOVE IT.");
+               LOGE("CAMERA NOT SUPPORTED, BUT INI FILE FOR CAMERA IS EXISTED. RECOMMEND TO REMOVE IT.");
                ret = CAMERA_ERROR_NOT_SUPPORTED;
                goto _CREATE_ERROR;
        }
@@ -5049,6 +5049,7 @@ int camera_dispatcher_get_device_state(muse_module_h module)
        int ret = CAMERA_ERROR_NONE;
        int is_called = false;
        char value_key[KEY_LENGTH] = {'\0',};
+       bool camera_feature_supported = false;
        camera_h camera = NULL;
        camera_device_e device_type = CAMERA_DEVICE_CAMERA0;
        camera_device_state_e get_device_state = CAMERA_DEVICE_STATE_NULL;
@@ -5075,6 +5076,17 @@ int camera_dispatcher_get_device_state(muse_module_h module)
                        camera = NULL;
                }
 
+               /* camera feature support check */
+               if (ret == CAMERA_ERROR_NONE) {
+                       if (muse_server_get_platform_info(CAMERA_FEATURE_NAME, &camera_feature_supported) != MM_ERROR_NONE)
+                               LOGE("failed to get platform info for camera support");
+
+                       if (!camera_feature_supported) {
+                               LOGE("CAMERA NOT SUPPORTED, BUT INI FILE FOR CAMERA IS EXISTED. RECOMMEND TO REMOVE IT.");
+                               ret = CAMERA_ERROR_NOT_SUPPORTED;
+                       }
+               }
+
                muse_server_module_set_value(module, MUSED_KEY_DEVICE_STATE_RETURN, ret);
                muse_server_module_set_value(module, MUSED_KEY_DEVICE_STATE_CHECK, (int)true);
        } else {
index ffe8bda..dbe077c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-camera
 Summary:    A Camera module for muse server
-Version:    0.3.8
+Version:    0.3.9
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0