Add condition to skip invoking focus callback in case of unregistering without releas... 51/119751/1
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 20 Mar 2017 04:09:15 +0000 (13:09 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 20 Mar 2017 04:33:17 +0000 (13:33 +0900)
For session backward compatibility, there can be serveral nodes that have focus in the same process.
Check focus status of other node that has same pid as the focus node's that requested to unregister
to skip invoking focus callback if a node with acquired status exists.

[Version] 0.10.102
[Profile] Common
[Issue Type] Bug fix

Change-Id: I2c213ecacc9da743cc2b0359bf57ba5b38c17c82
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
focus_server/mm_sound_mgr_focus.c
packaging/libmm-sound.spec

index 40beb58e2a4e3f19ca086356b13a51b4acecec67..9b8c5771fc5b20c15b5307d13f8646e9830790de 100644 (file)
@@ -679,7 +679,7 @@ int mm_sound_mgr_focus_destroy_node(const _mm_sound_mgr_focus_param_t *param)
                                continue;
                        if (my_node == node || node->is_for_watch)
                                continue;
-                       if (node->pid == my_node->pid && node->is_for_session) {
+                       if (node->pid == my_node->pid && node->is_for_session && node->status) {
                                debug_error("focus for session for this pid still remains, skip updating victim focus nodes");
                                need_to_trigger = false;
                                break;
@@ -1025,7 +1025,7 @@ int mm_sound_mgr_focus_request_release(const _mm_sound_mgr_focus_param_t *param)
                                continue;
                        if (node == my_node || node->is_for_watch)
                                continue;
-                       if (node->pid == my_node->pid && node->is_for_session && my_node->status & node->status) {
+                       if (node->pid == my_node->pid && node->is_for_session && node->status) {
                                debug_error("focus for session for this pid is active, skip callbacks");
                                need_to_trigger_watch_cb = false;
                                need_to_trigger_cb = false;
index 1654c3bc077c8dfa21a51e760a308e28dadcfbaf..ed377cc48bb62ba394e0e22af8b7923eab9617e6 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.10.101
+Version:    0.10.102
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0