summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsegwon <segwon.han@samsung.com>2016-11-30 20:11:20 +0900
committersegwon <segwon.han@samsung.com>2016-11-30 20:11:44 +0900
commit8a5df4dd319f06fe7eb5bf72bbff655eaf20c93a (patch)
treed27020bcf23fb3a23956dc24c634381c4ff18c31
parent0686b8f1296156802c0cbe427f675e77fce14a2d (diff)
downloadd2d-conv-setting-8a5df4dd319f06fe7eb5bf72bbff655eaf20c93a.tar.gz
d2d-conv-setting-8a5df4dd319f06fe7eb5bf72bbff655eaf20c93a.tar.bz2
d2d-conv-setting-8a5df4dd319f06fe7eb5bf72bbff655eaf20c93a.zip
bug fix and add event state the APP_PAUSE, APP_RESUME, APP_TERMINATE.submit/tizen/20161130.105941accepted/tizen/mobile/20161130.233324
Signed-off-by: segwon <segwon.han@samsung.com> Change-Id: If86bace16d1ab1d9ae1f398a53f88270e307c7d3
-rw-r--r--inc/main.h5
-rw-r--r--src/main.c6
-rw-r--r--src/ui/setting_item_device_list.c13
3 files changed, 18 insertions, 6 deletions
diff --git a/inc/main.h b/inc/main.h
index e6b00c5..fa22698 100644
--- a/inc/main.h
+++ b/inc/main.h
@@ -44,7 +44,10 @@ typedef enum state {
POWER_ON,
DISCOVERY_START,
DISCOVERY_STOP,
- CHANGE_LANGUAGE
+ CHANGE_LANGUAGE,
+ APP_PAUSE,
+ APP_RESUME,
+ APP_TERMINATE
} state_e;
#define TITLE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_TITLE_TEXT")
diff --git a/src/main.c b/src/main.c
index cf8dd93..5ea6046 100644
--- a/src/main.c
+++ b/src/main.c
@@ -48,17 +48,17 @@ static void app_control(app_control_h app_control, void *data)
static void app_pause(void *data)
{
- // Empty
+ state_change_event(APP_PAUSE);
}
static void app_resume(void *data)
{
- // Empty
+ state_change_event(APP_RESUME);
}
static void app_terminate(void *data)
{
- // Empty
+ state_change_event(APP_TERMINATE);
}
int main(int argc, char *argv[])
diff --git a/src/ui/setting_item_device_list.c b/src/ui/setting_item_device_list.c
index 85f6153..c22e9d8 100644
--- a/src/ui/setting_item_device_list.c
+++ b/src/ui/setting_item_device_list.c
@@ -170,13 +170,13 @@ static void gl_expanded_cb(void *data, Evas_Object *obj, void *event_info)
} else if (!strcmp(ALLOWED_DEVICE_LIST_TEXT, type)) {
for (index = 0; index <= permitted_devices_index; index++){
if (permitted_devices_info[index] != NULL) {
- elm_genlist_item_append(list, device_item_builder, permitted_devices_info[index], it, ELM_GENLIST_ITEM_NONE, device_list_select_cb, discovered_devices_info[index]);
+ elm_genlist_item_append(list, device_item_builder, permitted_devices_info[index], it, ELM_GENLIST_ITEM_NONE, device_list_select_cb, permitted_devices_info[index]);
}
}
} else if (!strcmp(DENIED_DEVICE_LIST_TEXT, type)) {
for (index = 0; index <= denied_devices_index; index++){
if (denied_devices_info[index] != NULL) {
- elm_genlist_item_append(list, device_item_builder, denied_devices_info[index], it, ELM_GENLIST_ITEM_NONE, device_list_select_cb, discovered_devices_info[index]);
+ elm_genlist_item_append(list, device_item_builder, denied_devices_info[index], it, ELM_GENLIST_ITEM_NONE, device_list_select_cb, denied_devices_info[index]);
}
}
}
@@ -350,6 +350,15 @@ static void state_change_event_listener (state_e state)
case CHANGE_LANGUAGE :
elm_genlist_realized_items_update(group_list_item);
break;
+ case APP_PAUSE :
+ discovery_stop();
+ break;
+ case APP_RESUME :
+ set_acl_device_list();
+ break;
+ case APP_TERMINATE :
+ discovery_stop();
+ break;
default :
break;
}