summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShobhitAd <adlakhashobhit@gmail.com>2018-11-16 16:35:50 -0500
committerShobhitAd <adlakhashobhit@gmail.com>2018-11-20 12:45:23 -0500
commitce76a8b072f3c11386534d823df530a6a826b514 (patch)
tree93cdf1ae598dfe164b2063b2f9ac9c22e23c6da6
parente07013316897e2a7e9b0a12809ac084755a73d99 (diff)
downloadsdl_core-ce76a8b072f3c11386534d823df530a6a826b514.tar.gz
Removed redundant smart object
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloudapp_properties_request.cc37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloudapp_properties_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloudapp_properties_request.cc
index ca5a46e3dc..d92f458587 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloudapp_properties_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/set_cloudapp_properties_request.cc
@@ -18,6 +18,7 @@ SetCloudAppPropertiesRequest::SetCloudAppPropertiesRequest(
policy_handler) {}
SetCloudAppPropertiesRequest::~SetCloudAppPropertiesRequest() {}
+
void SetCloudAppPropertiesRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
ApplicationSharedPtr app = application_manager_.application(connection_key());
@@ -34,41 +35,7 @@ void SetCloudAppPropertiesRequest::Run() {
return;
}
- smart_objects::SmartObject cloud_app_properties(smart_objects::SmartType_Map);
-
- cloud_app_properties[strings::msg_params][strings::app_name] =
- (*message_)[strings::msg_params][strings::app_name];
- cloud_app_properties[strings::msg_params][strings::app_id] =
- (*message_)[strings::msg_params][strings::app_id];
-
- if ((*message_)[strings::msg_params].keyExists(strings::enabled)) {
- smart_objects::SmartObject enabled =
- (*message_)[strings::msg_params][strings::enabled];
- cloud_app_properties[strings::msg_params][strings::enabled] = enabled;
- }
- if ((*message_)[strings::msg_params].keyExists(
- strings::cloud_app_auth_token)) {
- smart_objects::SmartObject auth_token =
- (*message_)[strings::msg_params][strings::cloud_app_auth_token];
- cloud_app_properties[strings::msg_params][strings::cloud_app_auth_token] =
- auth_token;
- }
- if ((*message_)[strings::msg_params].keyExists(
- strings::cloud_transport_type)) {
- smart_objects::SmartObject transport_type =
- (*message_)[strings::msg_params][strings::cloud_transport_type];
- cloud_app_properties[strings::msg_params][strings::cloud_transport_type] =
- transport_type;
- }
- if ((*message_)[strings::msg_params].keyExists(
- strings::hybrid_app_preference)) {
- smart_objects::SmartObject hybrid_app_preference =
- (*message_)[strings::msg_params][strings::hybrid_app_preference];
- cloud_app_properties[strings::msg_params][strings::hybrid_app_preference] =
- hybrid_app_preference;
- }
-
- policy_handler_.OnSetCloudAppProperties(cloud_app_properties);
+ policy_handler_.OnSetCloudAppProperties(*message_);
SendResponse(true, mobile_apis::Result::SUCCESS);
}