Revert "sound-manager API changed" 20/99620/1
authorKiseok Chang <kiso.chang@samsung.com>
Wed, 23 Nov 2016 11:16:18 +0000 (03:16 -0800)
committerKiseok Chang <kiso.chang@samsung.com>
Wed, 23 Nov 2016 11:16:18 +0000 (03:16 -0800)
This reverts commit 418c011ff40e4d1153347f9ce119201411c032af.

Change-Id: I2fa003132092c1dcf4697c31dd67bf32a9652b2b

setting-profile/src/setting-profile-common.c
setting-ringtone/src/setting-ringtone-util.c
setting-ringtone/src/setting-ringtone.c

index 44bc1ece09070e541de76aa0b3f5b098ac463909..37c8aac6a58ab82b3dd3dbb885ce16e7b1e209c3 100755 (executable)
@@ -42,10 +42,7 @@ SliderIcons slider_icons[SND_SLIDER_MAX] = {
 
 static void __sound_stream_focus_state_changed_cb(
                sound_stream_info_h stream_info,
-               sound_stream_focus_mask_e focus_mask,
-               sound_stream_focus_state_e focus_state,
                sound_stream_focus_change_reason_e reason,
-               int sound_behaviors,
                const char *extra_info,
                void *user_data);
 
@@ -1133,10 +1130,7 @@ static void __mm_player_prepared_cb(void *user_data)
 
 static void __sound_stream_focus_state_changed_cb(
                sound_stream_info_h stream_info,
-               sound_stream_focus_mask_e focus_mask,
-               sound_stream_focus_state_e focus_state,
                sound_stream_focus_change_reason_e reason,
-               int sound_behaviors,
                const char *extra_info,
                void *user_data)
 {
@@ -1234,7 +1228,7 @@ bool setting_sound_play_sound(
                sound_manager_get_focus_state(sound_stream_info_to_set, &ssfs, NULL);
                if (ssfs == SOUND_STREAM_FOCUS_STATE_RELEASED ) {
                        err = sound_manager_acquire_focus(sound_stream_info_to_set,
-                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
                        if (err != SOUND_MANAGER_ERROR_NONE) {
                                SETTING_TRACE_ERROR("Could not acquire focus: [%s]", get_error_message(err));
                                player_unprepare(ad->mp_player);
@@ -1252,7 +1246,7 @@ bool setting_sound_play_sound(
                SETTING_TRACE_ERROR("error to set audio policy [%s]", get_error_message(err));
                if (sound_type != SOUND_TYPE_NOTIFICATION)
                        sound_manager_release_focus(sound_stream_info_to_set,
-                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
                player_unprepare(ad->mp_player);
                return false;
        }
@@ -1263,7 +1257,7 @@ bool setting_sound_play_sound(
                                get_error_message(err));
                if (sound_type != SOUND_TYPE_NOTIFICATION)
                        sound_manager_release_focus(sound_stream_info_to_set,
-                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
                player_unprepare(ad->mp_player);
                return false;
        }
@@ -1275,7 +1269,7 @@ bool setting_sound_play_sound(
                                get_error_message(err));
                if (sound_type != SOUND_TYPE_NOTIFICATION)
                        sound_manager_release_focus(sound_stream_info_to_set,
-                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
                player_unprepare(ad->mp_player);
                return false;
        }
@@ -1287,7 +1281,7 @@ bool setting_sound_play_sound(
                SETTING_TRACE_ERROR("player_prepare() error %d", err);
                if (sound_type != SOUND_TYPE_NOTIFICATION)
                        sound_manager_release_focus(sound_stream_info_to_set,
-                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
                player_unprepare(ad->mp_player);
                return false;
        }
@@ -1299,7 +1293,7 @@ bool setting_sound_play_sound(
                SETTING_TRACE_ERROR("state of player is invalid %d", err);
                if (sound_type != SOUND_TYPE_NOTIFICATION)
                        sound_manager_release_focus(sound_stream_info_to_set,
-                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
                player_unprepare(ad->mp_player);
                return false;
        }
@@ -1313,7 +1307,7 @@ bool setting_sound_play_sound(
                player_unset_completed_cb(ad->mp_player);
                if (sound_type != SOUND_TYPE_NOTIFICATION)
                        sound_manager_release_focus(sound_stream_info_to_set,
-                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                       SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
                player_unprepare(ad->mp_player);
                return false;
        }
@@ -1373,12 +1367,12 @@ void setting_sound_stop_sound(void *data)
        sound_manager_get_focus_state(ad->ringtone_sound_stream_info, &ssfs, NULL);
        if (ssfs == SOUND_STREAM_FOCUS_STATE_ACQUIRED)
                sound_manager_release_focus(ad->ringtone_sound_stream_info,
-                                                               SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                                               SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
 
        sound_manager_get_focus_state(ad->media_sound_stream_info, &ssfs, NULL);
        if (ssfs == SOUND_STREAM_FOCUS_STATE_ACQUIRED)
                sound_manager_release_focus(ad->media_sound_stream_info,
-                                                               SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+                                                               SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
 
        player_get_state(ad->mp_player, &player_state);
 
index 45f6ba3dcc9a3683f7a7546fc292653052040381..5f23500eb44d9dacad6424728d27dcc2d9594d71 100644 (file)
@@ -142,7 +142,7 @@ static inline bool _aquire_focus(SettingRingtoneData *ringtone_data)
                return true;
        }
 
-       err = sound_manager_acquire_focus(ringtone_data->ringtone_sound_stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+       err = sound_manager_acquire_focus(ringtone_data->ringtone_sound_stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
        if (err != SOUND_MANAGER_ERROR_NONE) {
                SETTING_TRACE_ERROR("Could not acquire focus [%s]", get_error_message(err));
                return false;
@@ -166,7 +166,7 @@ static inline bool _release_focus(SettingRingtoneData *ringtone_data)
                return true;
        }
 
-       err = sound_manager_release_focus(ringtone_data->ringtone_sound_stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL);
+       err = sound_manager_release_focus(ringtone_data->ringtone_sound_stream_info, SOUND_STREAM_FOCUS_FOR_PLAYBACK, NULL);
        if (err != SOUND_MANAGER_ERROR_NONE) {
                SETTING_TRACE_ERROR("[%s:%d] sound_manager_release_focus() error: %s", get_error_message(err));
                return false;
index fa69e169fd2b76b0f2f7ec57f442e050cd7b99c3..0361ad2b023d7418db20603b89465878dcca2858 100755 (executable)
@@ -86,10 +86,7 @@ bool __parse_appctl_request(app_control_h service, void *priv)
 
 static void __sound_stream_focus_state_changed_cb(
                sound_stream_info_h stream_info,
-               sound_stream_focus_mask_e focus_mask,
-               sound_stream_focus_state_e focus_state,
                sound_stream_focus_change_reason_e reason,
-               int sound_behaviors,
                const char *extra_info,
                void *user_data)
 {