return view_info.pre_sound_type;
}
-volume_error_e volume_view_set_default_slider(){
+volume_error_e volume_view_set_default_slider()
+{
Evas_Object *slider = volume_view_slider_get();
elm_object_style_set(slider, "default");
return VOLUME_ERROR_OK;
}
-volume_error_e volume_view_set_warning_slider(){
+volume_error_e volume_view_set_warning_slider()
+{
Evas_Object *slider = volume_view_slider_get();
elm_object_style_set(slider, "warning");
Edje_Message_Float_Set *msg = alloca(sizeof(Edje_Message_Float_Set) + (sizeof(double)));
volume_sound_vconf_status_set(TYPE_VCONF_SOUND_STATUS, 0);
volume_sound_vconf_status_set(TYPE_VCONF_VIBRATION_STATUS, 0);
- if(VOLUME_ERROR_OK != volume_view_slider_value_set(0))
+ if (VOLUME_ERROR_OK != volume_view_slider_value_set(0))
_E("Failed to set slider value");
return 0;
- }
- else {
+ } else {
volume_sound_vconf_status_set(TYPE_VCONF_SOUND_STATUS, 1);
volume_sound_vconf_status_set(TYPE_VCONF_VIBRATION_STATUS, 0);
void volume_view_destroy_warning_popup(void)
{
_D("Destroy warning popup");
- if (VOLUME_ERROR_OK != volume_view_send_warning_signal(EINA_FALSE)) {
+ if (VOLUME_ERROR_OK != volume_view_send_warning_signal(EINA_FALSE))
_E("Failed to set warning status");
- }
evas_object_del(view_info.warning_popup);
view_info.warning_popup = NULL;
{
_D("Slider value set : %d", val);
retv_if(view_info.is_slider_touching, VOLUME_ERROR_FAIL);
- retv_if(val<0, VOLUME_ERROR_FAIL);
+ retv_if(val < 0, VOLUME_ERROR_FAIL);
elm_slider_value_set(view_info.slider, val);
return;
}
- switch (sound_type)
- {
+ switch (sound_type) {
case SOUND_TYPE_ALARM:
case SOUND_TYPE_RINGTONE:
if (sound)
case SOUND_TYPE_NOTIFICATION:
if (sound)
img = IMG_VOLUME_ICON_NOTI;
- else if(vibration)
+ else if (vibration)
img = IMG_VOLUME_ICON_NOTI_VIB;
else
img = IMG_VOLUME_ICON_NOTI_MUTE;
_D("Volume icon name set");
char buf[2056];
- switch (sound_type)
- {
+ switch (sound_type) {
case SOUND_TYPE_RINGTONE:
snprintf(buf, sizeof(buf), "%s%s", _("IDS_ST_HEADER_RINGTONES"), "volume");
break;
ret_if(!icon_setting);
if (EINA_TRUE != elm_image_file_set(icon_setting, volume_view_get_file_path(EDJ_APP), file)) {
- _E("Failed to set image file : %s, Group", EDJ_APP, file);
+ _E("Failed to set image file : %s, Group", file);
};
}
} else {
int current_angle = volume_control_get_current_angle();
_D("Current angle: %d", current_angle);
- switch(current_angle){
- case 90 :
- case 270 :
- _D("show,landscape");
- elm_object_signal_emit(view_info.ly_outer, "show,landscape", "bg");
- break;
- default :
- _D("show,portrait");
- elm_object_signal_emit(view_info.ly_outer, "show,portrait", "bg");
- break;
- }
+ switch (current_angle) {
+ case 90:
+ case 270:
+ _D("show,landscape");
+ elm_object_signal_emit(view_info.ly_outer, "show,landscape", "bg");
+ break;
+ default:
+ _D("show,portrait");
+ elm_object_signal_emit(view_info.ly_outer, "show,portrait", "bg");
+ break;
+ }
}
return VOLUME_ERROR_OK;
}
{
_D("Volume view window SHOW is [%p]", view_info.win);
- elm_win_iconified_set(view_info.win, EINA_FALSE);
+ elm_win_activate(view_info.win);
- if (type == SOUND_TYPE_CALL) {
+ if (type == SOUND_TYPE_CALL)
_D("Sound type is Call");
- } else {
+ else
volume_view_setting_icon_callback_add();
- }
return VOLUME_ERROR_OK;
}
tzsh_window tz_win;
view_info.tzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
- if (!view_info.tzsh) {
+ if (!view_info.tzsh)
_E("Failed to get connection to Tizen window manager");
- }
tz_win = elm_win_window_id_get(win);
- if (!tz_win) {
+ if (!tz_win)
_E("Failed to get Tizen window manager");
- }
/*
* Tizen SDK do not support tzsh yet
*/
#if 0
view_info.volume_service = tzsh_volume_service_create(view_info.tzsh, tz_win);
- if (!view_info.volume_service) {
+ if (!view_info.volume_service)
_E("Failed to get volume service");
- }
#endif
}
{
_D("Down for HIDE");
- volume_control_hide_view();
+ if (VOLUME_ERROR_OK != volume_control_hide_view())
+ _E("Failed to close volume");
}
volume_error_e volume_view_layout_create(Evas_Object *win)
}
_D("lock type : %d", lock_type);
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_LOCK);
+ if (FEEDBACK_ERROR_NONE != feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_LOCK)) {
+ _E("Failed to play vibration");
+ }
}
}
_lock_sound_check();
/* hide volume window */
- if(VOLUME_ERROR_OK != volume_view_window_hide())
+ if (VOLUME_ERROR_OK != volume_view_window_hide())
_E("Failed to hide window");
- Evas_Object *win_splash = elm_win_add(NULL,"lockscreen_splash", ELM_WIN_NOTIFICATION);
+ Evas_Object *win_splash = elm_win_add(NULL, "lockscreen_splash", ELM_WIN_NOTIFICATION);
if (!win_splash) {
_E("Failed to add splash window");
val = elm_slider_value_get(view_info.slider);
val += 0.5;
- _D("slider value : %d", val);
+ _D("slider value : %lf", val);
if (view_info.is_slider_touching)
return;
static void _app_control_error_check(int ret)
{
if (ret != APP_CONTROL_ERROR_NONE) {
- switch (ret)
- {
- case APP_CONTROL_ERROR_INVALID_PARAMETER :
+ switch (ret) {
+ case APP_CONTROL_ERROR_INVALID_PARAMETER:
_E("error : APP_CONTROL_ERROR_INVALID_PARAMETER");
break;
- case APP_CONTROL_ERROR_OUT_OF_MEMORY :
+ case APP_CONTROL_ERROR_OUT_OF_MEMORY:
_E("error : APP_CONTROL_ERROR_OUT_OF_MEMORY");
break;
- case APP_CONTROL_ERROR_APP_NOT_FOUND :
+ case APP_CONTROL_ERROR_APP_NOT_FOUND:
_E("error : APP_CONTROL_ERROR_APP_NOT_FOUND");
break;
- case APP_CONTROL_ERROR_LAUNCH_REJECTED :
+ case APP_CONTROL_ERROR_LAUNCH_REJECTED:
_E("error : APP_CONTROL_ERROR_LAUNCH_REJECTED");
break;
- default :
+ default:
_E("error : %d", ret);
break;
}