svace : defect fixed 63/87663/1 accepted/tizen/3.0/common/20161114.105743 accepted/tizen/3.0/ivi/20161011.044330 accepted/tizen/3.0/mobile/20161015.033510 accepted/tizen/3.0/tv/20161016.004449 accepted/tizen/3.0/wearable/20161015.083208 accepted/tizen/common/20160912.180857 accepted/tizen/ivi/20160912.215120 accepted/tizen/mobile/20160912.215031 accepted/tizen/tv/20160912.215042 accepted/tizen/wearable/20160912.215100 submit/tizen/20160912.021422 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000003 submit/tizen_3.0_mobile/20161015.000003 submit/tizen_3.0_tv/20161015.000002 submit/tizen_3.0_wearable/20161015.000003
authorkj7.sung <kj7.sung@samsung.com>
Fri, 9 Sep 2016 04:55:44 +0000 (13:55 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Fri, 9 Sep 2016 04:55:44 +0000 (13:55 +0900)
Change-Id: I75eb5faddef818a890e501f6ea0876e7dbd588a3
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
location/manager/location-passive.c
location/manager/location.c

index 778930f..1663f86 100755 (executable)
@@ -136,10 +136,12 @@ static int __set_started(gpointer self, gboolean started)
 static void passive_gps_cb(keynode_t * key, gpointer self)
 {
        LOC_FUNC_LOG
+       g_return_if_fail(key);
+       g_return_if_fail(self);
        LocationPassivePrivate *priv = GET_PRIVATE(self);
-       g_return_val_if_fail(priv, LOCATION_ERROR_NOT_AVAILABLE);
-       g_return_val_if_fail(priv->mod, LOCATION_ERROR_NOT_AVAILABLE);
-       g_return_val_if_fail(priv->mod->handler, LOCATION_ERROR_NOT_AVAILABLE);
+       g_return_if_fail(priv);
+       g_return_if_fail(priv->mod);
+       g_return_if_fail(priv->mod->handler);
 
        LocationPosition *pos = NULL;
        LocationVelocity *vel = NULL;
@@ -162,10 +164,12 @@ static void passive_gps_cb(keynode_t * key, gpointer self)
 static void passive_wps_cb(keynode_t *key, gpointer self)
 {
        LOC_FUNC_LOG
+       g_return_if_fail(key);
+       g_return_if_fail(self);
        LocationPassivePrivate *priv = GET_PRIVATE(self);
-       g_return_val_if_fail(priv, LOCATION_ERROR_NOT_AVAILABLE);
-       g_return_val_if_fail(priv->mod, LOCATION_ERROR_NOT_AVAILABLE);
-       g_return_val_if_fail(priv->mod->handler, LOCATION_ERROR_NOT_AVAILABLE);
+       g_return_if_fail(priv);
+       g_return_if_fail(priv->mod);
+       g_return_if_fail(priv->mod->handler);
 
        LocationPosition *pos = NULL;
        LocationVelocity *vel = NULL;
index 4d53cab..e84decb 100755 (executable)
@@ -567,11 +567,8 @@ location_get_last_velocity(LocationObject *obj, LocationVelocity **velocity, Loc
 EXPORT_API int
 location_get_accessibility_state(LocationAccessState *state)
 {
-       int ret = LOCATION_ERROR_NONE;
-
 #ifndef TIZEN_PROFILE_TV
-       ret = location_check_cynara(LOCATION_PRIVILEGE);
-#endif
+       int ret = location_check_cynara(LOCATION_PRIVILEGE);
 
        if (ret == LOCATION_ERROR_NONE) {
                *state = LOCATION_ACCESS_ALLOWED;
@@ -579,6 +576,9 @@ location_get_accessibility_state(LocationAccessState *state)
                *state = LOCATION_ACCESS_DENIED;
                LOCATION_LOGE("Cannot use location service for privacy[%d]", ret);
        }
+#else
+       *state = LOCATION_ACCESS_ALLOWED;
+#endif
 
        return LOCATION_ERROR_NONE;
 }