summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndriy Byzhynar (GitHub) <AByzhynar@luxoft.com>2020-05-10 18:36:38 +0300
committersniukalov <sniukaov@luxoft.com>2020-07-03 11:57:12 +0300
commit7e8defc727eedf74e5a9336f46ef610b462597a6 (patch)
tree58d0b487aa0e7e2c2a5f380a4394543381f69160
parent97df4b571e4ea9624021b45011cc8ef250f80290 (diff)
downloadsdl_core-7e8defc727eedf74e5a9336f46ef610b462597a6.tar.gz
Move function to iface class to allow its testing
-rw-r--r--src/components/application_manager/include/application_manager/state_controller_impl.h9
-rw-r--r--src/components/include/application_manager/state_controller.h9
-rw-r--r--src/components/include/test/application_manager/mock_state_controller.h3
3 files changed, 14 insertions, 7 deletions
diff --git a/src/components/application_manager/include/application_manager/state_controller_impl.h b/src/components/application_manager/include/application_manager/state_controller_impl.h
index c6121f5d1d..04851d66ab 100644
--- a/src/components/application_manager/include/application_manager/state_controller_impl.h
+++ b/src/components/application_manager/include/application_manager/state_controller_impl.h
@@ -125,6 +125,8 @@ class StateControllerImpl : public event_engine::EventObserver,
void ActivateDefaultWindow(ApplicationSharedPtr app) OVERRIDE;
void ExitDefaultWindow(ApplicationSharedPtr app) OVERRIDE;
+ void DeactivateApp(ApplicationSharedPtr app,
+ const WindowID window_id) OVERRIDE;
private:
int64_t RequestHMIStateChange(ApplicationConstSharedPtr app,
@@ -274,13 +276,6 @@ class StateControllerImpl : public event_engine::EventObserver,
void TempStateStopped(HmiState::StateID ID);
/**
- * @brief Sets BACKGROUND or LIMITED hmi level to application
- * depends on application type
- * @param app Application to deactivate
- */
- void DeactivateApp(ApplicationSharedPtr app, const WindowID window_id);
-
- /**
* Function to remove temporary HmiState for application
*/
template <HmiState::StateID ID>
diff --git a/src/components/include/application_manager/state_controller.h b/src/components/include/application_manager/state_controller.h
index 2fa4b0c218..93d4c4fc39 100644
--- a/src/components/include/application_manager/state_controller.h
+++ b/src/components/include/application_manager/state_controller.h
@@ -223,6 +223,15 @@ class StateController {
* @param app pointer to application to be exited
*/
virtual void ExitDefaultWindow(ApplicationSharedPtr app) = 0;
+
+ /**
+ * @brief Sets BACKGROUND or LIMITED hmi level to application
+ * depends on application type
+ * @param window_id ID of app window to deactivate
+ * @param app Application to deactivate
+ */
+ virtual void DeactivateApp(ApplicationSharedPtr app,
+ const WindowID window_id) = 0;
};
} // namespace application_manager
diff --git a/src/components/include/test/application_manager/mock_state_controller.h b/src/components/include/test/application_manager/mock_state_controller.h
index 545090bf30..26d403ba75 100644
--- a/src/components/include/test/application_manager/mock_state_controller.h
+++ b/src/components/include/test/application_manager/mock_state_controller.h
@@ -108,6 +108,9 @@ class MockStateController : public am::StateController {
MOCK_CONST_METHOD1(IsStateActive, bool(am::HmiState::StateID state_id));
MOCK_METHOD1(ActivateDefaultWindow, void(am::ApplicationSharedPtr app));
MOCK_METHOD1(ExitDefaultWindow, void(am::ApplicationSharedPtr app));
+ MOCK_METHOD2(DeactivateApp,
+ void(am::ApplicationSharedPtr app,
+ const am::WindowID window_id));
};
} // namespace application_manager_test