summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsaerome.kim <saerome.kim@samsung.com>2019-07-22 12:10:58 +0900
committersaerome.kim <saerome.kim@samsung.com>2019-07-22 14:37:24 +0900
commit5b898f2eb893d569e26201cdb32eda131e4476fe (patch)
tree5dd4655568181eb2469f5fccb4c943eb17ecc7e3
parent5a03e8d0b1e93743cfa2f5fb512126fe25b61578 (diff)
downloaduser-awareness-resfs/for/tizen.tar.gz
user-awareness-resfs/for/tizen.tar.bz2
user-awareness-resfs/for/tizen.zip
Fixed a bug that can't get Wi-Fi sensor validityresfs/for/tizen
Moved the location of LPM test casse. Change-Id: Ib65fb3a8671e2c62ae1ebf919b73e2425b2dbe13 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
-rw-r--r--include/user-awareness-private.h4
-rw-r--r--include/user-awareness.h4
-rw-r--r--test/uat-detections.c35
-rw-r--r--test/uat-init.c48
-rw-r--r--test/uat-sensors.c3
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 <gio/gio.h>
#include <user-awareness.h>
+#include <user-awareness-internal.h>
#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));