Test and feature check updated
[platform/core/api/location-manager.git] / src / location_internal.c
index 0ad81f5..054a4a0 100644 (file)
@@ -149,15 +149,28 @@ int __is_batch_supported(void)
 int __is_fused_supported(void)
 {
        bool is_supported = false;
+       bool is_accelerometer = false;
+       bool is_gyroscope = false;
        int retval = 0;
 
        retval = system_info_get_platform_bool("http://tizen.org/feature/location.fused", &is_supported);
        if (retval != SYSTEM_INFO_ERROR_NONE)
                LOCATIONS_LOGW("system_info_get_platform_bool failed: retval = %d", retval);
-
        if (is_supported == false)
                return LOCATIONS_ERROR_NOT_SUPPORTED;
 
+       retval = system_info_get_platform_bool("http://tizen.org/feature/sensor.accelerometer", &is_accelerometer);
+       if (retval != SYSTEM_INFO_ERROR_NONE)
+               LOCATIONS_LOGW("system_info_get_platform_bool failed: retval = %d", retval);
+       if (is_accelerometer == false)
+               return LOCATIONS_ERROR_NOT_SUPPORTED;
+
+       retval = system_info_get_platform_bool("http://tizen.org/feature/sensor.gyroscope", &is_gyroscope);
+       if (retval != SYSTEM_INFO_ERROR_NONE)
+               LOCATIONS_LOGW("system_info_get_platform_bool failed: retval = %d", retval);
+       if (is_gyroscope == false)
+               return LOCATIONS_ERROR_NOT_SUPPORTED;
+
        return LOCATIONS_ERROR_NONE;    //LCOV_EXCL_LINE
 }