setting_profile_close_all_mm_players(ad);
}
-Eina_Bool __volume_timer_cb(void *data)
-{
- SETTING_TRACE_BEGIN;
- retv_if(data == NULL, EINA_FALSE);
- SettingProfileUG *ad = (SettingProfileUG *)data;
- double value = 0.0;
-
- SETTING_TRACE_DEBUG("cur_vol_type : %d", ad->cur_vol_type);
-
- switch(ad->cur_vol_type)
- {
- case SETTING_VOL_TYPE_RINGTONE:
- if(ad->data_call_volume)
- {
- value = elm_slider_value_get(ad->data_call_volume->eo_check);
- sound_manager_set_volume(SOUND_TYPE_RINGTONE, (unsigned int)(value+0.5));
- setting_profile_change_player_volume(&ad->mp_ringtone, value);
- }
- break;
- case SETTING_VOL_TYPE_NOTIFICATION:
- if(ad->data_noti_volume)
- {
- value = elm_slider_value_get(ad->data_noti_volume->eo_check);
- sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, (unsigned int)(value+0.5));
- setting_profile_change_player_volume(&ad->mp_noti, value);
- }
- break;
- case SETTING_VOL_TYPE_MEDIA:
- if(ad->data_media_volume)
- {
- value = elm_slider_value_get(ad->data_media_volume->eo_check);
- sound_manager_set_volume(SOUND_TYPE_MEDIA, (unsigned int)(value+0.5));
- setting_profile_change_player_volume(&ad->mp_media, value);
- }
- break;
- case SETTING_VOL_TYPE_SYSTEM:
- if(ad->data_touch_volume)
- {
- value = elm_slider_value_get(ad->data_touch_volume->eo_check);
- sound_manager_set_volume(SOUND_TYPE_SYSTEM, (unsigned int)(value+0.5));
- setting_profile_change_player_volume(&ad->mp_sys, value);
- }
- break;
- case SETTING_VOL_TYPE_NOTI_VIB:
- if(ad->data_vib_volume)
- {
- value = elm_slider_value_get(ad->data_vib_volume->eo_check);
- vconf_set_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, (unsigned int)(value+0.5));
- }
- break;
- case SETTING_VOL_TYPE_HAPTIC_VIB:
- if(ad->data_touch_vib)
- {
- value = elm_slider_value_get(ad->data_touch_vib->eo_check);
- vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, (unsigned int)(value+0.5));
- //It must change synchronizly to avoid the unexpected terminate issue
- vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, (unsigned int)(value+0.5));
- }
- break;
- default:
- break;
-
- }
- return ECORE_CALLBACK_RENEW;
-}
-
-void __create_volume_timer(void *data, setting_volume_types type)
-{
- SETTING_TRACE_BEGIN;
- ret_if(data == NULL);
-
- SettingProfileUG *ad = (SettingProfileUG *)data;
-
- if(ad->volume_timer)
- {
- ecore_timer_del(ad->volume_timer);
- ad->volume_timer = NULL;
- SETTING_TRACE_DEBUG("[AA] volume timer is deleted");
- }
- ad->volume_timer = ecore_timer_add(SETTING_SOUND_VOLUME_TIMER_INTERVAL, (Ecore_Task_Cb)__volume_timer_cb, ad);
-}
-
void __ringtone_start_change_cb(void *data, Evas_Object *obj, void *event_info)
{
ret_if(data == NULL);
setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_SYSTEM);
}
-void __noti_vib_start_change_cb(void *data, Evas_Object *obj, void *event_info)
-{
- ret_if(data == NULL);
-
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data;
- SettingProfileUG *ad = list_item->userdata;
-
- ad->cur_vol_type = SETTING_VOL_TYPE_NOTI_VIB;
- setting_profile_close_all_mm_players(ad);
-}
-
-void __haptic_vib_start_change_cb(void *data, Evas_Object *obj, void *event_info)
- {
- SETTING_TRACE_BEGIN;
- ret_if(data == NULL);
-
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data;
- SettingProfileUG *ad = list_item->userdata;
-
- ad->cur_vol_type = SETTING_VOL_TYPE_HAPTIC_VIB;
- setting_profile_close_all_mm_players(ad);
-}
-
void __volume_stop_change_cb(void *data, Evas_Object *obj, void *event_info)
{
SETTING_TRACE_BEGIN;
return;
}
- __create_volume_timer(ad, ad->cur_vol_type);
-
FREE(pa_tone_path);
SETTING_TRACE_END;
}
-void __vibration_stop_change_cb(void *data, Evas_Object *obj, void *event_info)
-{
- ret_if(data == NULL);
-
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data;
- SettingProfileUG *ad = list_item->userdata;
-
- if (device_haptic_stop_play(ad->hnd_hpt) != 0) {
- SETTING_TRACE("ERROR device_haptic_stop_play");
- /* return; */
- }
-
- double value = 0.0;
- switch(ad->cur_vol_type)
- {
- case SETTING_VOL_TYPE_NOTI_VIB:
- if(ad->data_vib_volume)
- {
- value = elm_slider_value_get(ad->data_vib_volume->eo_check);
- vconf_set_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, (unsigned int)(value+0.5));
- if(value < 0.5)
- elm_slider_value_set(ad->data_vib_volume->eo_check, 0);
- else
- elm_slider_value_set(ad->data_vib_volume->eo_check, (unsigned int)(value+0.5));
- }
- break;
- case SETTING_VOL_TYPE_HAPTIC_VIB:
- if(ad->data_touch_vib)
- {
- value = elm_slider_value_get(ad->data_touch_vib->eo_check);
- vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, (unsigned int)(value+0.5));
- vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, (unsigned int)(value+0.5));
- if(value < 0.5)
- elm_slider_value_set(ad->data_touch_vib->eo_check, 0);
- else
- elm_slider_value_set(ad->data_touch_vib->eo_check, (unsigned int)(value+0.5));
- }
- break;
- default:
- break;
- }
- ad->cur_vol_type = SETTING_VOL_TYPE_MAX;
- SETTING_TRACE_END;
-}
-
static Evas_Object *__get_main_list(void *data)
{
retv_if(data == NULL, NULL);
SETTING_TRACE_ERROR("ad->data_touch_volume is NULL");
}
- (void)setting_create_Gendial_field_titleItem(genlist,
- &(ad->itc_group_item),
- "IDS_ST_BODY_CALLALERTTYPE_VIBRATION", NULL);
-
setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon),
NULL, ad,
SWALLOW_Type_LAYOUT_SPECIALIZTION_X,
if(list_item->chk_status != (int)(val+0.5))
{
list_item->chk_status = (int)(val+0.5);
+ sound_manager_set_volume(SOUND_TYPE_RINGTONE, (unsigned int)list_item->chk_status);
SETTING_TRACE_DEBUG("ringtone volume is %d, %f", list_item->chk_status, val);
}
}
if(list_item->chk_status != (int)(val+0.5))
{
list_item->chk_status = val;
+ sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, (unsigned int)list_item->chk_status);
+ SETTING_TRACE_DEBUG("notification volume is %d, %f", list_item->chk_status, val);
}
}
if(list_item->chk_status != (int)(val+0.5))
{
list_item->chk_status = val;
+ sound_manager_set_volume(SOUND_TYPE_MEDIA, (unsigned int)list_item->chk_status);
+ SETTING_TRACE_DEBUG("media volume is %d, %f", list_item->chk_status, val);
}
}
if(list_item->chk_status != (int)(val+0.5))
{
list_item->chk_status = val;
+ sound_manager_set_volume(SOUND_TYPE_SYSTEM, (unsigned int)list_item->chk_status);
+ SETTING_TRACE_DEBUG("system volume is %d, %f", list_item->chk_status, val);
}
}
-static void
-setting_profile_sound_main_vib_sound_slider_value_change_cb(void *data,
- Evas_Object *obj,
- void *event_info)
-{
- /* error check */
- ret_if(data == NULL);
-
- static double priv_val_db = 5.0;
- static int priv_val_int = 0;
- double val = elm_slider_value_get(obj);
- SETTING_TRACE("val = %f", val);
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data;
- SettingProfileUG *ad = list_item->userdata;
- list_item->chk_status = val;
-
- int value;
- int err;
-
- value = (int)(val + 0.5); /* to sync displayed value on slider */
- if (value != priv_val_int) {
- int vib_volume = value;
- device_haptic_stop_play(ad->hnd_hpt);
- err = device_haptic_play_monotone_with_feedback_level(ad->hnd_hpt, 1000, vib_volume);
-
- if (err < 0)
- SETTING_TRACE("Failed to play haptic monotone");
- priv_val_int = value;
- }
- priv_val_db = val;
-
-}
-
-static void
-setting_profile_sound_main_touchVib_sound_slider_value_change_cb(void *data,
- Evas_Object *
- obj, void
- *event_info)
-{
- /* error check */
- ret_if(data == NULL);
-
- static double priv_val_db = 3.0;
- static int priv_val_int = 0;
- double val = elm_slider_value_get(obj);
- SETTING_TRACE("val = %f", val);
- Setting_GenGroupItem_Data *list_item =
- (Setting_GenGroupItem_Data *) data;
- SettingProfileUG *ad = list_item->userdata;
- list_item->chk_status = val;
-
- int value;
- int err;
-
- value = (int)(val + 0.5); /* to sync displayed value on slider */
- if (value != priv_val_int) {
-
- int vib_volume = value; /* SETTING_VIB_VOL_MAX; */
- device_haptic_stop_play(ad->hnd_hpt);
- err = device_haptic_play_monotone_with_feedback_level(ad->hnd_hpt, 1000, vib_volume);
-
- if (err < 0)
- SETTING_TRACE("Failed to play haptic monotone");
- priv_val_int = value;
- }
- priv_val_db = val;
-}
-