sync with latest 3.0 80/113080/1
authorkj7.sung <kj7.sung@samsung.com>
Mon, 6 Feb 2017 04:27:10 +0000 (13:27 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Mon, 6 Feb 2017 04:27:10 +0000 (13:27 +0900)
Change-Id: I455d3b71916ebebf5fca7969d56c707548581393
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
src/locations.c

index 1efd9b0..b8e1a8a 100755 (executable)
@@ -69,12 +69,11 @@ static LocationMethod __convert_LocationMethod(location_method_e method)
 
 static void __cb_service_updated(GObject *self, guint type, gpointer data, gpointer velocity, gpointer accuracy, gpointer userdata)
 {
-       LOCATIONS_LOGD("Callback function has been invoked. ");
        location_manager_s *handle = (location_manager_s *) userdata;
 
        if (type == SATELLITE_UPDATED && handle->user_cb[_LOCATIONS_EVENT_TYPE_SATELLITE]) {
                LocationSatellite *sat = (LocationSatellite *)data;
-               LOCATIONS_LOGD("Current satellite information: timestamp : %d, number of active : %d, number of inview : %d",
+               LOCATIONS_LOGD("callback invoked[TYPE_SATELLITE] timestamp : %d, number of active : %d, number of inview : %d",
                                                sat->timestamp, sat->num_of_sat_used, sat->num_of_sat_inview);
                ((gps_status_satellite_updated_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_SATELLITE])(sat->num_of_sat_used, sat->num_of_sat_inview,
                                                                                        sat->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_SATELLITE]);
@@ -84,12 +83,14 @@ static void __cb_service_updated(GObject *self, guint type, gpointer data, gpoin
                LocationAccuracy *acc = (LocationAccuracy *) accuracy;
                ((location_changed_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_DISTANCE])(pos->latitude, pos->longitude, pos->altitude,
                                                                vel->speed, vel->direction, acc->horizontal_accuracy, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_DISTANCE]);
+               LOCATIONS_LOGD("callback invoked[TYPE_DISTANCE] timestamp : %d", pos->timestamp);
        } else {
 
                if (handle->user_cb[_LOCATIONS_EVENT_TYPE_POSITION] && (type & POSITION_UPDATED) != 0) {
                        LocationPosition *pos = (LocationPosition *) data;
                        ((location_position_updated_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_POSITION])(pos->latitude, pos->longitude, pos->altitude,
                                                                                        pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_POSITION]);
+                       LOCATIONS_LOGD("callback invoked[TYPE_POSITION] timestamp : %d", pos->timestamp);
                }
 
                if (handle->user_cb[_LOCATIONS_EVENT_TYPE_VELOCITY] && (type & VELOCITY_UPDATED) != 0) {
@@ -104,6 +105,7 @@ static void __cb_service_updated(GObject *self, guint type, gpointer data, gpoin
                        LocationAccuracy *acc = (LocationAccuracy *) accuracy;
                        ((location_changed_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_POS_VEL])(pos->latitude, pos->longitude, pos->altitude,
                                                                        vel->speed, vel->direction, acc->horizontal_accuracy, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_POS_VEL]);
+                       LOCATIONS_LOGD("callback invoked[TYPE_POS_VEL] timestamp : %d", pos->timestamp);
                }
        }
 }
@@ -134,7 +136,7 @@ static void __cb_batch_updated(GObject *self, guint num_of_location, gpointer us
 
 static void __cb_service_enabled(GObject *self, guint status, gpointer userdata)
 {
-       LOCATIONS_LOGD("Invoked. status = %d", status);
+       LOCATIONS_LOGD("Invoked[service_enabled]. status = %d", status);
        location_manager_s *handle = (location_manager_s *) userdata;
        if (handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]) {
                ((location_service_state_changed_cb)
@@ -144,7 +146,7 @@ static void __cb_service_enabled(GObject *self, guint status, gpointer userdata)
 
 static void __cb_service_disabled(GObject *self, guint status, gpointer userdata)
 {
-       LOCATIONS_LOGD("Invoked. status = %d", status);
+       LOCATIONS_LOGD("Invoked[service_disabled]. status = %d", status);
        location_manager_s *handle = (location_manager_s *) userdata;
        if (handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]) {
                ((location_service_state_changed_cb)
@@ -1051,9 +1053,6 @@ EXPORT_API int location_manager_unset_distance_based_location_changed_cb(locatio
        LOCATIONS_LOGD("location_manager_unset_distance_updated_cb");
        LOCATIONS_NOT_SUPPORTED_CHECK(__is_location_supported());
        LOCATIONS_NULL_ARG_CHECK(manager);
-       location_manager_s *handle = (location_manager_s *) manager;
-       g_object_set(handle->object, "min-interval", 0, NULL);
-       g_object_set(handle->object, "min-distance", 0, NULL);
        return __unset_callback(_LOCATIONS_EVENT_TYPE_DISTANCE, manager);
 }