Remove deprecated behavior in sound_manager_get_current_sound_type() 10/170010/1 accepted/tizen/unified/20180312.060408 accepted/tizen/unified/20180315.150740 submit/tizen/20180219.063156 submit/tizen/20180226.045401 submit/tizen/20180228.101651 submit/tizen/20180302.055405 submit/tizen/20180305.044543 submit/tizen/20180312.104235 submit/tizen/20180313.010029 submit/tizen/20180314.065049
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 13 Feb 2018 00:15:37 +0000 (09:15 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 13 Feb 2018 00:16:35 +0000 (09:16 +0900)
[Version] 0.5.1
[Issue Type] Clean-up

Change-Id: I99da3cb1edda0dd2559f0ef899f6368a3471ed7d
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-sound-manager.spec
src/sound_manager.c

index f534dcb11ec953a0354191b89a6ffb56f973bb57..258cfd577f8ef7189c336053ebc0ff64fcac4502 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.5.0
+Version:    0.5.1
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index b0fe74765a01a7960d0c000ebb8eb37b08fa98b1..196333b0e80f29b5148632b0adbc9d3841cc3eb2 100644 (file)
@@ -76,24 +76,17 @@ int sound_manager_get_volume(sound_type_e type, int *volume)
 int sound_manager_get_current_sound_type(sound_type_e *type)
 {
        int ret = MM_ERROR_NONE;
-       volume_type_t mm_sound_vol_type = VOLUME_TYPE_UNKNOWN;
        char *volume_type = NULL;
 
        if (type == NULL)
                return _convert_sound_manager_error_code(__func__, MM_ERROR_INVALID_ARGUMENT);
 
-       ret  = mm_sound_volume_primary_type_get(&mm_sound_vol_type);
+       /* get the volume type of the current playing stream */
+       ret = _get_current_volume_type(DIRECTION_OUT_STR, &volume_type);
        if (ret == MM_ERROR_NONE) {
-               if (mm_sound_vol_type == VOLUME_TYPE_UNKNOWN) {
-                       /* get the volume type of the current playing stream */
-                       ret = _get_current_volume_type(DIRECTION_OUT_STR, &volume_type);
-                       if (ret == MM_ERROR_NONE)
-                               ret = _convert_sound_type_to_enum((const char*)volume_type, type);
-               } else {
-                       *type = mm_sound_vol_type;
-               }
+               ret = _convert_sound_type_to_enum((const char*)volume_type, type);
+               LOGI("type=%d", *type);
        }
-       LOGI("type=%d", *type);
 
        return _convert_sound_manager_error_code(__func__, ret);
 }