Fix duplicated setting RINGTONE type in first volume changing.
authorhhh.kwon <hhh.kwon@samsung.com>
Fri, 29 Mar 2013 03:17:08 +0000 (12:17 +0900)
committerhhh.kwon <hhh.kwon@samsung.com>
Fri, 29 Mar 2013 03:17:08 +0000 (12:17 +0900)
src/_sound.c

index 4bb43bc..ea57587 100755 (executable)
@@ -204,10 +204,11 @@ void _mm_func(void *data)
        mm_sound_volume_get_value(ad->type, (unsigned int*)(&val));
 
        /* apply earphone safety concept */
-       if(ad->device != device){
-               if(device == SYSTEM_AUDIO_ROUTE_PLAYBACK_DEVICE_EARPHONE && val > 9)
+       if(ad->device != device) {
+               if(device == SYSTEM_AUDIO_ROUTE_PLAYBACK_DEVICE_EARPHONE && val > 9) {
                        val = 9;
                        _set_sound_level(ad->type, val);
+               }
                ad->device = device;
        }
        _set_device_warning(ad, val, device);