summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
diff options
context:
space:
mode:
authorKozoriz <kozorizandriy@gmail.com>2016-04-11 16:21:12 +0300
committerKozoriz <kozorizandriy@gmail.com>2016-04-25 12:05:00 +0300
commit2c7dc612ce41461bebc3416917d2607f24002285 (patch)
tree3dfce6575c040c3469e17ec1eab07d02c3dee92f /src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
parent8b1699d3829ad4e2384788652a2102f7cd8a8bff (diff)
downloadsdl_core-2c7dc612ce41461bebc3416917d2607f24002285.tar.gz
Mobile commands update after removing all singletones
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc')
-rw-r--r--src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
index dc63a11941..3363eb854b 100644
--- a/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
+++ b/src/components/application_manager/src/commands/mobile/unregister_app_interface_request.cc
@@ -32,7 +32,7 @@
*/
#include "application_manager/commands/mobile/unregister_app_interface_request.h"
-#include "application_manager/application_manager_impl.h"
+
#include "application_manager/message_helper.h"
namespace application_manager {
@@ -42,18 +42,16 @@ namespace commands {
void UnregisterAppInterfaceRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- ApplicationManagerImpl* app_manager = ApplicationManagerImpl::instance();
-
- if (!app_manager->application(connection_key())) {
+ if (!application_manager_.application(connection_key())) {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
LOG4CXX_ERROR(logger_, "Application is not registered");
return;
}
- MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile(
+ application_manager_.ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
connection_key(),
- mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM);
- app_manager->UnregisterApplication(connection_key(),
+ mobile_api::AppInterfaceUnregisteredReason::INVALID_ENUM), commands::Command::ORIGIN_SDL);
+ application_manager_.UnregisterApplication(connection_key(),
mobile_apis::Result::SUCCESS);
SendResponse(true, mobile_apis::Result::SUCCESS);
}