diff options
author | Lukasz Stanislawski <l.stanislaws@samsung.com> | 2019-10-02 13:52:37 +0200 |
---|---|---|
committer | Kiseok Chang <kiso.chang@samsung.com> | 2019-10-07 10:53:02 +0900 |
commit | f66efae015d7336fba971162e71d14e102766091 (patch) | |
tree | dea0de8de49d7623284bd551c763fe809490f3e4 | |
parent | 0209be6bef57cfe094742ed70e9879f689bcb0ac (diff) | |
download | settings-f66efae015d7336fba971162e71d14e102766091.tar.gz settings-f66efae015d7336fba971162e71d14e102766091.tar.bz2 settings-f66efae015d7336fba971162e71d14e102766091.zip |
Remove Sound submenus:
1. Vibrate when ringing
2. Other sounds -> Dialing keypad tone
3. Other sounds -> Screen lock sound
Change-Id: I83c14dba048bd3f7e663191e03268a39ee98f2cb
Signed-off-by: Kiseok Chang <kiso.chang@samsung.com>
-rwxr-xr-x | setting-profile/src/setting-profile-sound-main.c | 184 |
1 files changed, 2 insertions, 182 deletions
diff --git a/setting-profile/src/setting-profile-sound-main.c b/setting-profile/src/setting-profile-sound-main.c index dc2efba..de35341 100755 --- a/setting-profile/src/setting-profile-sound-main.c +++ b/setting-profile/src/setting-profile-sound-main.c @@ -237,79 +237,6 @@ const char *setting_notifiaction_on_lock_screen(void *data) * ***************************************************/ -static Eina_Bool _play_ringtone_sound_idle_cb(void *data) -{ - double current; - char *pa_tone_path = NULL; - player_state_e state = PLAYER_STATE_NONE ; - Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; - SettingSoundData *ad = list_item->userdata; - - SETTING_TRACE_BEGIN; - retv_if(!data, EINA_FALSE); - - player_get_state(ad->mp_player, &state); - - if (list_item->eo_check) { - current = elm_slider_value_get(list_item->eo_check); - list_item->chk_status = (int)(current + 0.5); - } - - /* - * S5 concept: - * On the volume popup, - * 1) if user controls the slider, don't play any sounds, - * just change volume. - * 2) if user controls the HW volume key for ringtone sound, - * the beep sound is supported - - * On Setting > Sound - * 1) if user controls the slider, change volume & play sound - * 2) if user controls the HW volume key, do nothing - * (DO NOT change volume,DO NOT play sound) - */ - if (0 == safeStrCmp(ad->viewtype, VOLUME_APP_NAME)) - return EINA_FALSE; - - if (state == PLAYER_STATE_IDLE) { - pa_tone_path = vconf_get_str( - VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); - if (pa_tone_path == NULL) { - if (isEmulBin()) - pa_tone_path = strdup(SETTING_DEFAULT_CALL_TONE_SDK); - else - pa_tone_path = strdup(SETTING_DEFAULT_CALL_TONE); - - if (vconf_set_str( - VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, - pa_tone_path) < 0) { - free(pa_tone_path); - return EINA_FALSE; - } - } - if (list_item->chk_status > 0) { - setting_sound_play_sound_origin( - ad, - NULL, - pa_tone_path, - (float)list_item->chk_status, - SOUND_TYPE_RINGTONE); - } - free(pa_tone_path); - } else { - SETTING_TRACE("ringtone player status : %d", state); - if (state == PLAYER_STATE_PAUSED) { - player_start(ad->mp_player); - } else if (state == PLAYER_STATE_PLAYING) { - if (ad->sound_on) - player_set_mute(ad->mp_player, false); - } - } - - ad->play_ringtone_idler = NULL; - return EINA_FALSE; -} - void _start_change_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; @@ -328,69 +255,6 @@ void _start_change_cb(void *data, Evas_Object *obj, void *event_info) setting_sound_stop_sound(ad); } -static void _call_slider_change_cb( - void *data, Evas_Object *obj, void *event_info) -{ - SETTING_TRACE_BEGIN; - SettingSoundData *ad = NULL; - double val = 0.0; - Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data; - ret_if(!data); - - val = elm_slider_value_get(obj); - ad = list_item->userdata; - - ad->is_ringtone_slidering = true; - - if (list_item->chk_status != (int)(val + 0.5)) { - list_item->chk_status = (int)(val + 0.5); - sound_manager_set_volume(SOUND_TYPE_RINGTONE, list_item->chk_status); - SETTING_TRACE_DEBUG( - "ringtone volume is %d, %f", - list_item->chk_status, - val); - - if (list_item->chk_status == 0) { - /* change to Vibration mode */ - /* call system_setting */ - /*system_settings_set_value_bool( - * SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, false); */ - vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, - FALSE); - vconf_set_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, - TRUE); - feedback_play_type(FEEDBACK_TYPE_VIBRATION, - FEEDBACK_PATTERN_VIBRATION_ON); - } else { - if (!ad->sound_on) { - /* change to Sound mode */ - /* call system_setting */ - /*system_settings_set_value_bool( - * SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, - * false); */ - vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, - TRUE); - vconf_set_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, - FALSE); - } - } - - setting_sound_update_slider_icon(list_item, SND_SLIDER_CALL); - - elm_slider_value_set(obj, list_item->chk_status); - } - - setting_sound_create_warning_popup_during_call(ad); - if (ad->calling_popup) - return; - - ecore_idler_del(ad->play_ringtone_idler); - ad->play_ringtone_idler = ecore_idler_add( - _play_ringtone_sound_idle_cb, list_item); - - SETTING_TRACE("list_item->chk_status:%d", list_item->chk_status); -} - static void _noti_slider_change_cb( void *data, Evas_Object *obj, void *event_info) { @@ -623,8 +487,6 @@ static void _get_lite_main_list(void *data) char *app_id = NULL; char *optional_txt = NULL; - char *sdcard_filepath = NULL; - int vconf_value = 0; char *sub_desc = NULL; char *left_icon = NULL; int mm_value = 0; @@ -673,6 +535,8 @@ static void _get_lite_main_list(void *data) /*------------------------------------------------------------------ */ /*------------------------------------------------------------------ */ + (void)app_get_id(&app_id); + #if 0 /* 1. Ringtones */ SETTING_TRACE(" ???????????? ad->viewtype : %s ", ad->viewtype); @@ -753,8 +617,6 @@ static void _get_lite_main_list(void *data) if (sound_value == FALSE) mm_value = 0; - (void)app_get_id(&app_id); - if (app_id && !strcmp(VOLUME_APP_NAME, app_id)) optional_txt = "IDS_ST_MBODY_RINGTONE"; @@ -906,25 +768,6 @@ static void _get_lite_main_list(void *data) __BACK_POINTER_SET(ad->data_touch_volume); if (0 != safeStrCmp(ad->viewtype, VOLUME_APP_NAME)) { - /* 7. Vibrate when ringing */ - if (vconf_get_bool( - VCONFKEY_SETAPPL_VIBRATE_WHEN_RINGING_BOOL, - &vconf_value) < 0) { - /* default value of vibrate sound : on */ - vconf_value = TRUE; - } - ADD_TOGGLE_MENU2( - ad->data_sound_when_ring, - genlist, - itc_1text_1icon, - "IDS_ST_BODY_VIBRATE_WHEN_RINGING", - vconf_value, - ad); - __BACK_POINTER_SET(ad->data_sound_when_ring); - - if (ad->data_sound_when_ring) - elm_object_item_disabled_set(ad->data_sound_when_ring->item, - !sound_value); /* 8. Feedback */ setting_create_Gendial_field_def(genlist, &itc_1text, _mouse_up_Gendial_list_cb, @@ -1408,29 +1251,6 @@ static void _mouse_up_Gendial_list_cb(void *data, "AND_MENU_ITEMS_ARE_TAPPED", vconf_value, ad) - /* 2. Keytones */ - if (vconf_get_bool(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, - &vconf_value) < 0) - /* default value of touch sounds : on */ - vconf_value = TRUE; - ADD_TOGGLE_MENU(ad->data_button_sounds, genlist, - itc_1text_1icon, - "IDS_ST_MBODY_DIALLING_KEYPAD_TONE", - "IDS_ST_BODY_PLAY_TONE_WHEN_THE_DIALLING_" - "KEYPAD_IS_TAPPED", - vconf_value, ad) - - /* 3. Screen lock sound */ - if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, - &vconf_value) < 0) - /* default value of lock/unlock sound : off */ - vconf_value = 0; - ADD_TOGGLE_MENU(ad->data_lock_sound, genlist, itc_1text_1icon, - "IDS_ST_BODY_SCREEN_LOCK_SOUND", - "IDS_ST_BODY_PLAY_SOUNDS_WHEN_LOCKING_AND_UNLOCKING_SCREEN", - vconf_value, ad) - - navi_it = elm_naviframe_item_push(ad->md.naviframe, "IDS_ST_MBODY_OTHER_SOUNDS", NULL, NULL, genlist, NULL); |