{ \
int ret = MM_ERROR_NONE; \
bool result = false; \
- ret = mm_sound_client_is_focus_cb_thread(x_thread, &result); \
+ ret = mm_sound_client_is_focus_cb_thread(x_thread, &result, NULL); \
if (ret) \
return ret; \
if (result) { \
} \
EXPORT_API
-int mm_sound_focus_is_cb_thread(bool *result)
+int mm_sound_focus_is_cb_thread(bool *result, bool *is_for_watching)
{
int ret = MM_ERROR_NONE;
debug_fenter();
- ret = mm_sound_client_is_focus_cb_thread(g_thread_self(), result);
+ if (result == NULL) {
+ debug_error("argument is not valid");
+ return MM_ERROR_INVALID_ARGUMENT;
+ }
+
+ ret = mm_sound_client_is_focus_cb_thread(g_thread_self(), result, is_for_watching);
if (!ret) {
if (*result)
debug_msg("it might be called in the thread of focus callback");
+ if (is_for_watching && *is_for_watching)
+ debug_msg("it's in the focus watch callback");
}
debug_fleave();
return MM_ERROR_INVALID_ARGUMENT;
}
- mm_sound_client_is_focus_cb_thread(g_thread_self(), &result);
+ mm_sound_client_is_focus_cb_thread(g_thread_self(), &result, NULL);
if (!result) {
if ((ret = mm_sound_client_unregister_focus(id)))
debug_error("Could not unregister focus, ret = %x", ret);
return ret;
}
- mm_sound_client_is_focus_cb_thread(g_thread_self(), &result);
+ mm_sound_client_is_focus_cb_thread(g_thread_self(), &result, NULL);
if (!result) {
if ((ret = mm_sound_client_unset_focus_watch_callback(id)))
debug_error("Could not unset focus watch callback, id(%d), ret[0x%x]", id, ret);