diff options
author | Collin <iCollin@users.noreply.github.com> | 2019-07-26 13:04:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-26 13:04:08 -0400 |
commit | 9a556df9e95a802dd25e97f4e778f6bc4715b48c (patch) | |
tree | c8117cc497583819172b8b15290886d226523d50 /src/components/application_manager/rpc_plugins | |
parent | 87a6f6204a2742cb679ee7dae22a00567a02d1f8 (diff) | |
parent | fb7a07c489501a6c933075e1c8d591ff2a3ce744 (diff) | |
download | sdl_core-9a556df9e95a802dd25e97f4e778f6bc4715b48c.tar.gz |
Merge pull request #2965 from smartdevicelink/feature/alert_icon
implement alert icon parameter to alert rpc
Diffstat (limited to 'src/components/application_manager/rpc_plugins')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc index 7173aaf2d0..908f31cd51 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc @@ -350,6 +350,23 @@ void AlertRequest::SendAlertRequest(int32_t app_id) { MessageHelper::SubscribeApplicationToSoftButton( (*message_)[strings::msg_params], app, function_id()); } + + if ((*message_)[strings::msg_params].keyExists(strings::alert_icon)) { + auto verification_result = MessageHelper::VerifyImage( + (*message_)[strings::msg_params][strings::alert_icon], + app, + application_manager_); + + if (mobile_apis::Result::INVALID_DATA == verification_result) { + LOG4CXX_ERROR(logger_, "Image verification failed."); + SendResponse(false, verification_result); + return; + } + + msg_params[strings::alert_icon] = + (*message_)[strings::msg_params][strings::alert_icon]; + } + // app_id msg_params[strings::app_id] = app_id; msg_params[strings::duration] = default_timeout_; |