From 5b898f2eb893d569e26201cdb32eda131e4476fe Mon Sep 17 00:00:00 2001 From: "saerome.kim" Date: Mon, 22 Jul 2019 12:10:58 +0900 Subject: Fixed a bug that can't get Wi-Fi sensor validity Moved the location of LPM test casse. Change-Id: Ib65fb3a8671e2c62ae1ebf919b73e2425b2dbe13 Signed-off-by: saerome.kim --- include/user-awareness-private.h | 4 ++-- include/user-awareness.h | 4 ++-- test/uat-detections.c | 35 +++++++++++++++++++++++++++++ test/uat-init.c | 48 ++++++---------------------------------- test/uat-sensors.c | 3 ++- 5 files changed, 48 insertions(+), 46 deletions(-) diff --git a/include/user-awareness-private.h b/include/user-awareness-private.h index a858a7a..3cec2c6 100644 --- a/include/user-awareness-private.h +++ b/include/user-awareness-private.h @@ -283,8 +283,8 @@ void _ua_monitor_handle_scan_complete(int result); * @post */ void _ua_monitor_handle_user_presence_detected(unsigned int bitmask, - char *service, char *account, - long timestamp); + char *service, char *account, + long timestamp); /** * @brief Stops monitoring detection. diff --git a/include/user-awareness.h b/include/user-awareness.h index 8c409c4..909fa45 100644 --- a/include/user-awareness.h +++ b/include/user-awareness.h @@ -1799,7 +1799,7 @@ int ua_device_destroy( /** * @ingroup CAPI_NETWORK_UA_MODULE - * @brief Sets a device type info for user handle. + * @brief Sets a device type info for a device. * @since_tizen 5.5 * * @param[in] device_handle The device handle @@ -1822,7 +1822,7 @@ int ua_device_set_mac_type( /** * @ingroup CAPI_NETWORK_UA_MODULE - * @brief Gets device type info for user handle. + * @brief Gets device type info from the device. * @since_tizen 5.5 * * @param[in] device_handle The device handle diff --git a/test/uat-detections.c b/test/uat-detections.c index 85840e3..24a59f6 100644 --- a/test/uat-detections.c +++ b/test/uat-detections.c @@ -22,6 +22,7 @@ #include #include +#include #include "uat-menu.h" #include "uat-common.h" @@ -290,6 +291,36 @@ static int run_ua_monitor_stop_absence_presence( return RET_SUCCESS; } +static int run_ua_enable_low_power_mode( + MManager *mm, struct menu_data *menu) +{ + int ret = UA_ERROR_NONE; + + msg("ua_enable_low_power_mode"); + + ret = ua_enable_low_power_mode(); + + msg(" - ua_enable_low_power_mode() ret: [0x%X] [%s]", + ret, uat_get_error_str(ret)); + + return RET_SUCCESS; +} + +static int run_ua_disable_low_power_mode( + MManager *mm, struct menu_data *menu) +{ + int ret = UA_ERROR_NONE; + + msg("ua_disable_low_power_mode"); + + ret = ua_disable_low_power_mode(); + + msg(" - ua_disable_low_power_mode() ret: [0x%X] [%s]", + ret, uat_get_error_str(ret)); + + return RET_SUCCESS; +} + static struct menu_data menu_start_device_scan[] = { { "1", "Device scan time multiplier", NULL, NULL, g_scan_time_multiplier}, { "2", "run", NULL, run_ua_monitor_start_scan_devices, NULL }, @@ -319,5 +350,9 @@ struct menu_data menu_ua_detections[] = { menu_start_device_scan, run_ua_monitor_cancel_scan_devices, NULL }, { "7", "start/stop absence/presence simulataneously", menu_start_absence_presence, NULL, NULL }, + { "8", "ua_enable_low_power_mode", + NULL, run_ua_enable_low_power_mode, NULL }, + { "9", "ua_disable_low_power_mode", + NULL, run_ua_disable_low_power_mode, NULL }, { NULL, NULL, }, }; diff --git a/test/uat-init.c b/test/uat-init.c index 12d1ee0..a2cdac0 100644 --- a/test/uat-init.c +++ b/test/uat-init.c @@ -224,36 +224,6 @@ static int run_ua_monitor_unset_sensor_state_cb( return RET_SUCCESS; } -static int run_ua_enable_low_power_mode( - MManager *mm, struct menu_data *menu) -{ - int ret = UA_ERROR_NONE; - - msg("ua_enable_low_power_mode"); - - ret = ua_enable_low_power_mode(); - - msg(" - ua_enable_low_power_mode() ret: [0x%X] [%s]", - ret, uat_get_error_str(ret)); - - return RET_SUCCESS; -} - -static int run_ua_disable_low_power_mode( - MManager *mm, struct menu_data *menu) -{ - int ret = UA_ERROR_NONE; - - msg("ua_disable_low_power_mode"); - - ret = ua_enable_low_power_mode(); - - msg(" - ua_disable_low_power_mode() ret: [0x%X] [%s]", - ret, uat_get_error_str(ret)); - - return RET_SUCCESS; -} - static int run_ua_register_app_resume(MManager *mm, struct menu_data *menu) { int ret = UA_ERROR_NONE; @@ -444,23 +414,19 @@ struct menu_data menu_ua_init[] = { NULL, run_ua_monitor_set_user_presence_detected_cb, NULL }, { "8", "ua_monitor_unset_presence_detected_cb", NULL, run_ua_monitor_unset_user_presence_detected_cb, NULL }, - { "9", "ua_enable_low_power_mode", - NULL, run_ua_enable_low_power_mode, NULL }, - { "10", "ua_disable_low_power_mode", - NULL, run_ua_disable_low_power_mode, NULL }, - { "11", "ua_register_app_resume", + { "9", "ua_register_app_resume", menu_ua_register_app_resume, NULL, NULL}, - { "12", "ua_unregister_app_resume", + { "10", "ua_unregister_app_resume", menu_ua_unregister_app_resume, NULL, NULL}, - { "13", "ua_set_detection_cycle", + { "11", "ua_set_detection_cycle", menu_ua_set_detection_cycle, NULL, NULL}, - { "14", "ua_get_detection_cycle", + { "12", "ua_get_detection_cycle", menu_ua_get_detection_cycle, NULL, NULL}, - { "15", "ua_set_detection_window", + { "13", "ua_set_detection_window", menu_ua_set_detection_window, NULL, NULL}, - { "16", "ua_get_detection_window", + { "14", "ua_get_detection_window", NULL, run_ua_get_detection_window, NULL}, - { "17", "ua_reset_database", + { "15", "ua_reset_database", NULL, run_ua_reset_database, NULL}, { NULL, NULL, }, diff --git a/test/uat-sensors.c b/test/uat-sensors.c index 5584e0c..efc9d6a 100644 --- a/test/uat-sensors.c +++ b/test/uat-sensors.c @@ -156,7 +156,8 @@ static int run_ua_monitor_is_sensor_available( uat_get_sensor_str(sensortype)); } - ret = ua_monitor_is_sensor_available(sensortype, &is_available); + ret = ua_monitor_is_sensor_available(__sensor_type_to_bitmask(sensortype), + &is_available); msg(" - ua_monitor_is_sensor_available() ret: [0x%X] [%s]", ret, uat_get_error_str(ret)); -- cgit v1.2.3