summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
index 98e26e1aa9..70f462c05d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
@@ -156,6 +156,11 @@ void CreateInteractionChoiceSetRequest::Run() {
// we have VR commands
SendVRAddCommandRequests(app);
} else {
+ if (MessageHelper::ChoiceSetVRCommandsStatus::NONE == vr_status) {
+ // Because on_event will not be called for this choice, we set is allowed
+ // right after added.
+ app->set_choice_set_allow_mode(choice_set_id_, true);
+ }
// we have none, just return with success
SendResponse(true, Result::SUCCESS);
}
@@ -462,6 +467,14 @@ void CreateInteractionChoiceSetRequest::DeleteChoices() {
void CreateInteractionChoiceSetRequest::OnAllHMIResponsesReceived() {
SDL_LOG_AUTO_TRACE();
+ ApplicationSharedPtr application =
+ application_manager_.application(connection_key());
+ if (!error_from_hmi_) {
+ application->set_choice_set_allow_mode(choice_set_id_, true);
+ SDL_LOG_DEBUG("Choice set with id " << choice_set_id_
+ << " is allowed to perform.");
+ }
+
if (!error_from_hmi_ && should_send_warnings_) {
SendResponse(true, mobile_apis::Result::WARNINGS, kInvalidImageWarningInfo);
} else if (!error_from_hmi_) {