email_params_h params = NULL;
- if (email_params_create(¶ms) &&
- email_params_add_str(params, "marked_mode", marked_mode) &&
- email_params_add_str(params, "path", SETTING_DEFAULT_ALERT_PATH) &&
- email_params_add_str(params, "select_type", "SINGLE_FILE") &&
- email_params_add_str(params, "file_type", "SOUND") &&
- email_params_add_str(params, "title", "IDS_EMAIL_BODY_ALERT_RINGTONE_ABB") &&
- email_params_add_str(params, "domain", PACKAGE) &&
- email_params_add_str(params, "default", "default show") &&
- email_params_add_str(params, "silent", "silent show") &&
- email_params_add_str(params, "landscape", "support landscape")) {
+ if (email_params_create(¶ms)) {
email_launched_app_listener_t listener = { 0 };
listener.cb_data = li;
EmailSettingView *view = li->view;
- char *ringtone_file = NULL;
const char *ringtone_path = NULL;
+ const char **ringtone_array = NULL;
+ int array_length = 0;
- if (!email_params_get_str(reply, "result", &ringtone_path)) {
+ if (!email_params_get_str_array(reply, APP_CONTROL_DATA_SELECTED, &ringtone_array, &array_length)) {
debug_warning("ringtone path result is NULL");
return;
}
+ if (array_length < 1) {
+ debug_warning("array_length: %d", array_length);
+ return;
+ }
+
+ ringtone_path = ringtone_array[0];
+
debug_secure("ringtone_path: %s", ringtone_path);
if (!g_strcmp0(MYFILE_DEFAULT_RINGTON_VALUE, ringtone_path)) {
if (li->index == ALERT_RINGTONE_LIST_ITEM) {
view->account_data->options.alert_ringtone_path = strdup("");
}
} else {
- ringtone_file = _get_alert_title(ringtone_path);
- debug_secure("ringtone_file:%s", ringtone_file);
-
if (li->index == ALERT_RINGTONE_LIST_ITEM) {
view->account_data->options.default_ringtone_status = 0;
FREE(view->account_data->options.alert_ringtone_path);
}
elm_genlist_item_update(li->it);
- FREE(ringtone_file);
_update_account_info(view);
}