Exclude a node for session backward compatibility from the focus callback in case of unregistering without focus releasing.
Forward is_session value when unregistering focus node.
[Version] 0.10.81
[Profile] Common
[Issue Type] Bug fix
Change-Id: I64a0e82f67a7735166d791eeff613ad604f9b15e
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
int __mm_sound_mgr_focus_ipc_release_focus(int pid, int handle_id, int focus_type, int option, const char *ext_info, bool is_for_session);
int __mm_sound_mgr_focus_ipc_watch_focus(int pid, int handle_id, int focus_type, bool is_for_session);
int __mm_sound_mgr_focus_ipc_unwatch_focus(int pid, int handle_id);
-int __mm_sound_mgr_focus_ipc_unregister_focus(int pid, int handle_id);
+int __mm_sound_mgr_focus_ipc_unregister_focus(int pid, int handle_id, bool is_for_session);
int __mm_sound_mgr_focus_ipc_emergent_exit(int pid);
#endif /* __MM_SOUND_MGR_FOCUS_IPC_H__ */
}
}
if (my_node == NULL) {
- debug_error("could not find any node of pid[%d]/handle_id[%d]\n", param->pid, param->handle_id);
+ debug_error("could not find any node of pid[%d]/handle_id[%d]/is_for_session[%d]\n", param->pid, param->handle_id, param->is_for_session);
ret = MM_ERROR_INVALID_ARGUMENT;
goto FINISH;
}
UPDATE_FOCUS_TAKEN_INFO(by_id, node, my_node->taken_by_id[i].pid, my_node->taken_by_id[i].handle_id, false);
}
} else if (my_node->status & (i+1)) {
+ if (node->is_for_session)
+ continue;
_mm_sound_mgr_focus_param_t *new_param = g_malloc0(sizeof(_mm_sound_mgr_focus_param_t));
if (!new_param) {
debug_warning("Fail to g_malloc0 for new_param, but keep going\n");
}
g_variant_get(params, "(iib)", &pid, &handle_id, &is_for_session);
- ret = __mm_sound_mgr_focus_ipc_unregister_focus((is_for_session) ? pid : _get_sender_pid(invocation), handle_id);
+ ret = __mm_sound_mgr_focus_ipc_unregister_focus((is_for_session) ? pid : _get_sender_pid(invocation), handle_id, is_for_session);
send_reply:
if (ret == MM_ERROR_NONE) {
}
// method + remove callback
-int __mm_sound_mgr_focus_ipc_unregister_focus(int pid, int handle_id)
+int __mm_sound_mgr_focus_ipc_unregister_focus(int pid, int handle_id, bool is_for_session)
{
_mm_sound_mgr_focus_param_t param;
int ret = MM_ERROR_NONE;
memset(¶m, 0x00, sizeof(_mm_sound_mgr_focus_param_t));
param.pid = pid;
param.handle_id = handle_id;
+ param.is_for_session = is_for_session;
ret = mm_sound_mgr_focus_destroy_node(¶m);
Name: libmm-sound
Summary: MMSound Package contains client lib and sound_server binary
-Version: 0.10.80
+Version: 0.10.81
Release: 0
Group: System/Libraries
License: Apache-2.0