summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasato Ogawa <mogawa@xevo.com>2017-08-28 17:57:54 +0900
committerMasato Ogawa <mogawa@xevo.com>2017-08-28 17:57:54 +0900
commitda03235f13a1f7349ac231b69f14ec76b2ae7205 (patch)
tree4aca58cacbf04f3e3dd2e1862ffca66cced31396
parent6c35e9042afcc0d4080a9f2b64c9da089692cf0b (diff)
downloadsdl_core-da03235f13a1f7349ac231b69f14ec76b2ae7205.tar.gz
Removed check of Application registration
-rw-r--r--src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc17
-rw-r--r--src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc32
2 files changed, 0 insertions, 49 deletions
diff --git a/src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc b/src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc
index 3954e855c8..28a25a4eb3 100644
--- a/src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc
+++ b/src/components/application_manager/src/commands/mobile/send_haptic_data_request.cc
@@ -48,15 +48,6 @@ SendHapticDataRequest::~SendHapticDataRequest() {}
void SendHapticDataRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
- return;
- }
-
smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params];
msg_params[strings::app_id] = application->hmi_app_id();
SendHMIRequest(hmi_apis::FunctionID::UI_SendHapticData,
@@ -81,14 +72,6 @@ void SendHapticDataRequest::on_event(const event_engine::Event& event) {
mobile_api::Result::SUCCESS,
mobile_api::Result::WARNINGS);
- ApplicationSharedPtr application =
- application_manager_.application(connection_key());
-
- if (!application) {
- LOG4CXX_ERROR(logger_, "NULL pointer");
- return;
- }
-
SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
break;
}
diff --git a/src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc b/src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc
index 47cd75fcb8..5e140a9861 100644
--- a/src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc
+++ b/src/components/application_manager/test/commands/mobile/send_haptic_data_test.cc
@@ -106,19 +106,6 @@ TEST_F(SendHapticDataRequestTest, Run_SUCCESS) {
command->Run();
}
-TEST_F(SendHapticDataRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::APPLICATION_NOT_REGISTERED),
- am::commands::Command::ORIGIN_SDL));
-
- SendHapticDataRequestPtr command(CreateCommand<SendHapticDataRequest>(msg_));
-
- command->Run();
-}
-
TEST_F(SendHapticDataRequestTest, OnEvent_SUCCESS) {
EXPECT_CALL(app_mngr_,
ManageMobileCommand(
@@ -135,25 +122,6 @@ TEST_F(SendHapticDataRequestTest, OnEvent_SUCCESS) {
command->on_event(event);
}
-TEST_F(SendHapticDataRequestTest,
- OnEvent_ApplicationIsNotRegistered_UNSUCCESS) {
- EXPECT_CALL(app_mngr_, application(kConnectionKey))
- .WillOnce(Return(ApplicationSharedPtr()));
- EXPECT_CALL(app_mngr_,
- ManageMobileCommand(
- MobileResultCodeIs(mobile_apis::Result::SUCCESS),
- am::commands::Command::ORIGIN_SDL)).Times(0);
-
- (*msg_)[am::strings::msg_params] = 0;
- (*msg_)[am::strings::params][am::hmi_response::code] =
- hmi_apis::Common_Result::eType::SUCCESS;
- Event event(hmi_apis::FunctionID::UI_SendHapticData);
- event.set_smart_object(*msg_);
- SendHapticDataRequestPtr command(CreateCommand<SendHapticDataRequest>(msg_));
-
- command->on_event(event);
-}
-
TEST_F(SendHapticDataResponseTest, Run_Success) {
::smart_objects::SmartObject& message_ref = *message_;
message_ref[am::strings::msg_params][am::strings::result_code] =