summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim-Nexty <35795928+zhouxin627@users.noreply.github.com>2020-04-08 04:00:35 +0900
committerGitHub <noreply@github.com>2020-04-07 15:00:35 -0400
commitd2331b066ebb30305f1a5df644511f0f72a2381f (patch)
tree96ea823d4af6a2583c13851a3ee641feffe5d24e
parent5954b403928040f3d0f8e5c26912f64b063832ca (diff)
downloadsdl_core-d2331b066ebb30305f1a5df644511f0f72a2381f.tar.gz
fix APTDisplayText covert bug (#3291)
Co-authored-by: xiatian <xiatian@iauto.com>
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
index 0481542565..2f3d38f0b0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
@@ -287,20 +287,22 @@ void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
msg_params[hmi_request::audio_pass_display_texts] =
smart_objects::SmartObject(smart_objects::SmartType_Array);
+ int32_t index = 0;
if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text1)) {
- msg_params[hmi_request::audio_pass_display_texts][0]
+ msg_params[hmi_request::audio_pass_display_texts][index]
[hmi_request::field_name] = static_cast<int32_t>(
hmi_apis::Common_TextFieldName::audioPassThruDisplayText1);
- msg_params[hmi_request::audio_pass_display_texts][0]
+ msg_params[hmi_request::audio_pass_display_texts][index]
[hmi_request::field_text] =
(*message_)[str::msg_params][str::audio_pass_display_text1];
+ ++index;
}
if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text2)) {
- msg_params[hmi_request::audio_pass_display_texts][1]
+ msg_params[hmi_request::audio_pass_display_texts][index]
[hmi_request::field_name] = static_cast<int32_t>(
hmi_apis::Common_TextFieldName::audioPassThruDisplayText2);
- msg_params[hmi_request::audio_pass_display_texts][1]
+ msg_params[hmi_request::audio_pass_display_texts][index]
[hmi_request::field_text] =
(*message_)[str::msg_params][str::audio_pass_display_text2];
}