summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegwon <segwon.han@samsung.com>2017-01-09 13:50:44 +0900
committerSegwon <segwon.han@samsung.com>2017-01-09 13:51:16 +0900
commitbfcc5235556835e92753bed9e216d73af68dd324 (patch)
tree6e80af9f6011135f562582fb9e325adea7757878
parenta4be778cba50391d607402d02edffa155338ecee (diff)
downloadd2d-conv-setting-accepted/tizen_3.0.m2_wearable.tar.gz
d2d-conv-setting-accepted/tizen_3.0.m2_wearable.tar.bz2
d2d-conv-setting-accepted/tizen_3.0.m2_wearable.zip
and Modified not being found on client device, after Tizen Connect was turned off. Signed-off-by: Segwon <segwon.han@samsung.com> Change-Id: I17506e9865ec0c00722955cabb78edad31dd602f
-rw-r--r--src/ui/setting_home.c12
-rw-r--r--src/ui/setting_item_discovery.c12
2 files changed, 20 insertions, 4 deletions
diff --git a/src/ui/setting_home.c b/src/ui/setting_home.c
index 85aaa06..9477bc8 100644
--- a/src/ui/setting_home.c
+++ b/src/ui/setting_home.c
@@ -47,6 +47,11 @@ static void tizen_connect_power_on()
if (ret != CONV_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "tizen_connect_power_on error. ret = %d", ret);
}
+
+ ret = conv_internal_set_service_activation_state(tizen_connect_power_state);
+ if (ret != CONV_ERROR_NONE) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "conv_internal_set_service_activation_state error. ret = %d", ret);
+ }
}
static void tizen_connect_power_off()
@@ -55,10 +60,15 @@ static void tizen_connect_power_off()
notice_disable(EINA_FALSE);
tizen_connect_power_state = 0;
- int ret = conv_internal_set_activation_state(0);
+ int ret = conv_internal_set_activation_state(tizen_connect_power_state);
if (ret != CONV_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "tizen_connect_power_off error. ret = %d", ret);
}
+
+ ret = conv_internal_set_service_activation_state(tizen_connect_power_state);
+ if (ret != CONV_ERROR_NONE) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "conv_internal_set_service_activation_state error. ret = %d", ret);
+ }
}
static int get_tizen_connect_power_state()
diff --git a/src/ui/setting_item_discovery.c b/src/ui/setting_item_discovery.c
index fe8d1a2..24c7946 100644
--- a/src/ui/setting_item_discovery.c
+++ b/src/ui/setting_item_discovery.c
@@ -165,17 +165,23 @@ static void discovery_foreach_cb(conv_device_h device_h, int result, void *data)
conv_device_get_property_string(device_h, CONV_DEVICE_NAME, &device_name);
conv_device_get_property_string(device_h, CONV_DEVICE_TYPE, &device_type);
- int index = ++devices_index;
+ int index;
+ for (index = 0; index <= devices_index; index++) {
+ if (!strcmp(devices_info[index]->mac_address, device_id)) {
+ return;
+ }
+ }
+
+ index = ++devices_index;
devices_info[index] = (device_info_s *) calloc(sizeof(device_info_s), 1);
devices_info[index]->index = index;
devices_info[index]->name = device_name;
devices_info[index]->type = device_type;
devices_info[index]->mac_address = device_id;
- //elm_genlist_item_append(discovered_list, item_builder, devices_info[index], NULL, ELM_GENLIST_ITEM_NONE, show_discovery_deivce_selected_menu, devices_info[index]);
elm_genlist_item_insert_after(genlist, device_list_item_builder, devices_info[index], NULL, title_item, ELM_GENLIST_ITEM_NONE, show_acl_menu, devices_info[index]);
- break;
+ return;
case CONV_DISCOVERY_RESULT_FINISHED :
conv_destroy(conv_handle);