diff options
author | Collin <iCollin@users.noreply.github.com> | 2021-02-26 09:22:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 09:22:32 -0500 |
commit | 2f0ffaacaf807dce0e10c2bd52c232380d4b1367 (patch) | |
tree | 5f822cbedc2349d1b67a7f574f81ce1e84f2598d | |
parent | 1c22fee408a14532d6304e176d4f101014e20678 (diff) | |
download | sdl_core-2f0ffaacaf807dce0e10c2bd52c232380d4b1367.tar.gz |
fix switch with no breaks (#3637)
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc index 5bd3ce697e..bb990574bd 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc @@ -1110,27 +1110,15 @@ bool PerformInteractionRequest::SetChoiceIdToResponseMsgParams( return true; } - switch (interaction_mode_) { - case mobile_apis::InteractionMode::eType::MANUAL_ONLY: - if (ui_choice_id_valid) { - msg_param[strings::trigger_source] = - mobile_apis::TriggerSource::TS_MENU; - msg_param[strings::choice_id] = ui_choice_id_received_; - } - case mobile_apis::InteractionMode::eType::VR_ONLY: - if (vr_choice_id_valid) { - msg_param[strings::trigger_source] = mobile_apis::TriggerSource::TS_VR; - msg_param[strings::choice_id] = vr_choice_id_received_; - } - default: - if (ui_choice_id_valid) { - msg_param[strings::trigger_source] = - mobile_apis::TriggerSource::TS_MENU; - msg_param[strings::choice_id] = ui_choice_id_received_; - } else if (vr_choice_id_valid) { - msg_param[strings::trigger_source] = mobile_apis::TriggerSource::TS_VR; - msg_param[strings::choice_id] = vr_choice_id_received_; - } + if (ui_choice_id_valid && + interaction_mode_ != mobile_apis::InteractionMode::eType::VR_ONLY) { + msg_param[strings::trigger_source] = mobile_apis::TriggerSource::TS_MENU; + msg_param[strings::choice_id] = ui_choice_id_received_; + } else if (vr_choice_id_valid && + interaction_mode_ != + mobile_apis::InteractionMode::eType::MANUAL_ONLY) { + msg_param[strings::trigger_source] = mobile_apis::TriggerSource::TS_VR; + msg_param[strings::choice_id] = vr_choice_id_received_; } return true; |