From cf49a3ba79eea3307c3b10511eeb9c1e487a3402 Mon Sep 17 00:00:00 2001 From: "Anna Pipko (GitHub)" <39483182+APipko@users.noreply.github.com> Date: Wed, 22 Jan 2020 23:03:32 +0200 Subject: SDL restores AddCommands in the order they were created (#2515) * SDL restores AddCommands in the order they were created SDL generates and assigns internal_id for each AddCommand from mobile app and restore AddCommands by this internal_id * Fix message helper unit tests * Fix resume controller unit tests * Fix cmd_id in SendAddVRCommandToHMI * fixup! SDL restores AddCommands in the order they were created * Go to the next command if command id missing Co-authored-by: Ira Lytvynenko (GitHub) Co-authored-by: Yevhenii Dementieiev (GitHub) <57259850+ydementieiev@users.noreply.github.com> --- .../sdl_rpc_plugin/src/commands/mobile/add_command_request.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands') diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc index a57d222765..1dbfc97458 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_command_request.cc @@ -160,7 +160,9 @@ void AddCommandRequest::Run() { return; } - app->AddCommand((*message_)[strings::msg_params][strings::cmd_id].asUInt(), + const uint32_t internal_consecutive_number = application_manager::commands:: + CommandImpl::CalcCommandInternalConsecutiveNumber(app); + app->AddCommand(internal_consecutive_number, (*message_)[strings::msg_params]); smart_objects::SmartObject ui_msg_params = -- cgit v1.2.1