batch : test app fixed 65/152065/1 accepted/tizen/4.0/unified/20170926.062613 submit/tizen_4.0/20170925.072842
authorkj7.sung <kj7.sung@samsung.com>
Mon, 25 Sep 2017 04:06:53 +0000 (13:06 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Mon, 25 Sep 2017 04:06:53 +0000 (13:06 +0900)
Change-Id: I19195ff1520f0ae3aa1a4d18090ce1ef5efb3595
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
packaging/capi-location-manager.spec
test/location_test.c

index dda2f3a61010253c60a7c3ae81c27fd718eca259..87d8e3152000e55e0e796b203058763e1d63c887 100644 (file)
@@ -1,6 +1,6 @@
 Name: capi-location-manager
 Summary: A Location Manager library in Tizen Native API
-Version: 0.7.11
+Version: 0.7.12
 Release: 1
 Group: Location/API
 License: Apache-2.0
index 04d82108b136c6e649eccd5ddf281a4b3f2ab3be..95272ee23102048005a3deb6a19079212612cac5 100755 (executable)
@@ -340,8 +340,7 @@ void _location_changed_cb(double latitude, double longitude, double altitude, do
 
 bool _get_location_cb(double latitude, double longitude, double altitude, double speed, double direction, double horizontal, double vertical, time_t timestamp, void *user_data)
 {
-       fprintf(stderr, "-------------------------- batch: get location --------------------------\n");
-       fprintf(stderr, "[%ld] lat[%f] lon[%f] alt[%f] speed[%lf] direction[%lf], horizontal_accuracy[%lf]\n", timestamp, latitude, longitude, altitude, speed, direction, horizontal);
+       fprintf(stderr, "[%ld] pos[%f, %f, %f] spd[%.1f] dir[%.1f], hor[%.1f]\n", timestamp, latitude, longitude, altitude, speed, direction, horizontal);
        return TRUE;
 }
 
@@ -387,7 +386,7 @@ static void print_location_status()
        fprintf(stderr, "gps: %d, ", is_enabled);
 
        location_manager_is_enabled_method(LOCATIONS_METHOD_WPS, &is_enabled);
-       fprintf(stderr, "wps: %d", is_enabled);
+       fprintf(stderr, "wps: %d \n", is_enabled);
 }
 
 static int enable_method(location_method_e method, bool enable)
@@ -719,8 +718,19 @@ static void location_cleanup()
 {
        int ret = 0;
        if (manager != NULL) {
-               ret = location_manager_stop(manager);
-               fprintf(stderr, "stop: %d\n", ret);
+               if (menu == 31) {
+                       ret = location_manager_stop_batch(manager);
+                       fprintf(stderr, "stop_batch: %d\n", ret);
+
+                       ret = location_manager_unset_location_batch_cb(manager);
+                       fprintf(stderr, "unset_batch_cb: %d\n", ret);
+               } else {
+                       ret = location_manager_stop(manager);
+                       fprintf(stderr, "stop: %d\n", ret);
+
+                       ret = gps_status_unset_satellite_updated_cb(manager);
+                       fprintf(stderr, "gps_status_unset_satellite_updated_cb: %d\n", ret);
+               }
 
                ret = location_manager_unset_service_state_changed_cb(manager);
                fprintf(stderr, "unset_service_state_changed_cb: %d\n", ret);
@@ -728,9 +738,6 @@ static void location_cleanup()
                ret = location_manager_unset_position_updated_cb(manager);
                fprintf(stderr, "unset_position_updated_cb: %d\n", ret);
 
-               ret = gps_status_unset_satellite_updated_cb(manager);
-               fprintf(stderr, "gps_status_unset_satellite_updated_cb: %d\n", ret);
-
                ret = location_manager_destroy(manager);
                fprintf(stderr, "destroy: %d\n", ret);
                manager = NULL;