summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegwon <segwon.han@samsung.com>2017-01-09 13:46:18 +0900
committerSegwon <segwon.han@samsung.com>2017-01-09 13:47:27 +0900
commit28263b13231ab03865daebd86b5f308f542af564 (patch)
tree0df2253a3499b49c133615366bdaa49a1cb31cb5
parent63d60a213b8dc67c17d99bb20a6cece235dcec70 (diff)
downloadd2d-conv-setting-tizen_3.0.m2.tar.gz
d2d-conv-setting-tizen_3.0.m2.tar.bz2
d2d-conv-setting-tizen_3.0.m2.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: Ic95c376815c7abd167fd285a758d9488f321796e
-rw-r--r--src/ui/setting_item_device_list.c15
-rw-r--r--src/ui/setting_item_power.c10
2 files changed, 21 insertions, 4 deletions
diff --git a/src/ui/setting_item_device_list.c b/src/ui/setting_item_device_list.c
index ce8f5bc..535f260 100644
--- a/src/ui/setting_item_device_list.c
+++ b/src/ui/setting_item_device_list.c
@@ -76,7 +76,7 @@ static void popup_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
}
set_acl_device_list();
- evas_object_del(popup);
+ evas_object_del(popup);
}
static void show_device_list_selected_popup(char *title_name, char *content, char *left_button_name, char *center_button_name, char *right_button_name)
@@ -220,7 +220,7 @@ static Evas_Object* create_image(Evas_Object *parent, Evas_Coord w, Evas_Coord h
elm_image_file_set(img, "usr/apps/org.tizen.d2d-conv-setting/res/images/device_type_icon_multimedia.png", NULL);
}
- evas_object_size_hint_min_set(img, ELM_SCALE_SIZE(w), ELM_SCALE_SIZE(h));
+ evas_object_size_hint_min_set(img, ELM_SCALE_SIZE(w), ELM_SCALE_SIZE(h));
return img;
}
@@ -272,7 +272,14 @@ 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 = ++discovered_devices_index;
+ int index;
+ for (index = 0; index <= discovered_devices_index; index++) {
+ if (!strcmp(discovered_devices_info[index]->mac_address, device_id)) {
+ return;
+ }
+ }
+
+ index = ++discovered_devices_index;
discovered_devices_info[index] = (device_info_s *) calloc(sizeof(device_info_s), 1);
discovered_devices_info[index]->list_type = LIST_TYPE_DISCOVERED;
discovered_devices_info[index]->index = index;
@@ -283,7 +290,7 @@ static void discovery_foreach_cb(conv_device_h device_h, int result, void *data)
elm_genlist_item_append(discovered_list, device_item_builder, discovered_devices_info[index], discovered_device_group, ELM_GENLIST_ITEM_NONE, device_list_select_cb, discovered_devices_info[index]);
elm_genlist_item_fields_update(discovered_device_group, "elm.swallow.end", ELM_GENLIST_ITEM_FIELD_CONTENT);
- break;
+ return;
case CONV_DISCOVERY_RESULT_FINISHED :
conv_destroy(conv_handle);
diff --git a/src/ui/setting_item_power.c b/src/ui/setting_item_power.c
index f4ffa0b..041377a 100644
--- a/src/ui/setting_item_power.c
+++ b/src/ui/setting_item_power.c
@@ -24,6 +24,11 @@ static void convergence_power_on()
if (ret != CONV_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "convergence_power_on error. ret = %d", ret);
}
+
+ ret = conv_internal_set_service_activation_state(1);
+ if (ret != CONV_ERROR_NONE) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "conv_internal_set_service_activation_state error. ret = %d", ret);
+ }
}
static void convergence_power_off()
@@ -32,6 +37,11 @@ static void convergence_power_off()
if (ret != CONV_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "convergence_power_off error. ret = %d", ret);
}
+
+ ret = conv_internal_set_service_activation_state(0);
+ if (ret != CONV_ERROR_NONE) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "conv_internal_set_service_activation_state error. ret = %d", ret);
+ }
}
static int get_convergence_power_state()