summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc17
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 0fa42c0f21..dc225df3be 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
@@ -355,6 +355,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_;