Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/Check AudioStreamingState before starting stream #3763

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3473,6 +3473,7 @@ bool ApplicationManagerImpl::HMIStateAllowsStreaming(
using namespace mobile_apis::HMILevel;
using namespace mobile_apis::PredefinedWindows;
using namespace mobile_apis::VideoStreamingState;
using namespace mobile_apis::AudioStreamingState;
using namespace helpers;

ApplicationSharedPtr app = application(app_id);
Expand All @@ -3486,7 +3487,10 @@ bool ApplicationManagerImpl::HMIStateAllowsStreaming(
Compare<mobile_apis::HMILevel::eType, EQ, ONE>(
hmi_state->hmi_level(), HMI_FULL, HMI_LIMITED);
const bool allow_streaming_by_streaming_state =
hmi_state->video_streaming_state() == STREAMABLE;
(service_type == protocol_handler::SERVICE_TYPE_NAVI &&
hmi_state->video_streaming_state() == STREAMABLE) ||
(service_type == protocol_handler::SERVICE_TYPE_AUDIO &&
hmi_state->audio_streaming_state() != NOT_AUDIBLE);

return allow_streaming_by_hmi_level && allow_streaming_by_streaming_state;
}
Expand Down