else if (state == FOCUS_IS_ACQUIRED)
stream_info->acquired_focus |= focus_type;
+ if (state == FOCUS_IS_ACQUIRED)
+ _update_focus_status(stream_info->index, (unsigned int)stream_info->acquired_focus);
+
LOGI("[FOCUS USER CALLBACK(%p) START]", stream_info->user_cb);
stream_info->user_cb((sound_stream_info_h)stream_info, focus_type, state, change_reason,
option, extra_info, stream_info->user_data);
LOGI("[FOCUS USER CALLBACK(%p) END]", stream_info->user_cb);
- _update_focus_status(stream_info->index, (unsigned int)stream_info->acquired_focus);
+
+ if (state == FOCUS_IS_RELEASED)
+ _update_focus_status(stream_info->index, (unsigned int)stream_info->acquired_focus);
LEAVE:
LOGI("<< leave");