Add exception case as per the previous session policy when releasing focus 38/128738/1 accepted/tizen/unified/20170511.173106 submit/tizen/20170511.042527 tizen_4.0.m1_release
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 11 May 2017 07:26:15 +0000 (16:26 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 11 May 2017 07:27:42 +0000 (16:27 +0900)
 - session resumption is only available for media session.

[Version] 0.10.115
[Issue Type] Backward compatibility

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

index 9c77c13..e0532de 100644 (file)
@@ -1217,7 +1217,14 @@ int mm_sound_mgr_focus_request_release(const _mm_sound_mgr_focus_param_t *param)
                                continue;
                        for (i = 0; i < NUM_OF_STREAM_IO_TYPE; i++) {
                                if (param_s->request_type & (i+1)) {
-                                       if (node->taken_by_id[i].pid == param_s->pid && (node->taken_by_id[i].handle_id == param_s->handle_id || node->taken_by_id[i].by_session)) {
+                                       if (node->taken_by_id[i].pid == param_s->pid &&
+                                           (node->taken_by_id[i].handle_id == param_s->handle_id || node->taken_by_id[i].by_session)) {
+                                               /* exception case as per the previous session policy,
+                                                * "session resumption" is only available for "media session" */
+                                               if (my_node->is_for_session && node->is_for_session) {
+                                                       if (strncmp(node->stream_type, "media", MAX_STREAM_TYPE_LEN))
+                                                               continue;
+                                               }
                                                /* do callback for resumption */
                                                if ((ret = _mm_sound_mgr_focus_do_callback(FOCUS_COMMAND_ACQUIRE, node, param_s)))
                                                        debug_error("Fail to _focus_do_callback for COMMAND ACQUIRE to node[%x], ret[0x%x]\n", node, ret);
index 88c19ed..52cc064 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.10.114
+Version:    0.10.115
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0