summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kutsan <akutsan@luxoft.com>2020-05-15 15:54:28 +0300
committerAlexander Kutsan <akutsan@luxoft.com>2020-05-15 15:54:28 +0300
commited69ccb1f7e5f0d60809f18e2c3fee683f89417e (patch)
tree9942d2f7430755de0995637a0cdb4e14f4c43622
parent9d9d89cbfe3743afbf831725e24722e90dbe3395 (diff)
downloadsdl_core-impl/state_controller_sdd.tar.gz
revert code changesimpl/state_controller_sdd
-rw-r--r--src/components/application_manager/include/application_manager/state_controller_impl.h13
-rw-r--r--src/components/include/application_manager/state_controller.h12
-rw-r--r--src/components/include/test/application_manager/mock_state_controller.h6
3 files changed, 22 insertions, 9 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 9de4abd686..c6121f5d1d 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
@@ -112,6 +112,11 @@ class StateControllerImpl : public event_engine::EventObserver,
void OnVideoStreamingStopped(ApplicationConstSharedPtr app) OVERRIDE;
+ void OnStateChanged(ApplicationSharedPtr app,
+ const WindowID window_id,
+ HmiStatePtr old_state,
+ HmiStatePtr new_state) OVERRIDE;
+
bool IsStateActive(HmiState::StateID state_id) const OVERRIDE;
// EventObserver interface
@@ -122,11 +127,6 @@ class StateControllerImpl : public event_engine::EventObserver,
void ExitDefaultWindow(ApplicationSharedPtr app) OVERRIDE;
private:
- void OnStateChanged(ApplicationSharedPtr app,
- const WindowID window_id,
- HmiStatePtr old_state,
- HmiStatePtr new_state);
-
int64_t RequestHMIStateChange(ApplicationConstSharedPtr app,
hmi_apis::Common_HMILevel::eType level,
bool send_policy_priority);
@@ -423,9 +423,6 @@ class StateControllerImpl : public event_engine::EventObserver,
const mobile_apis::HMILevel::eType hmi_level) const;
typedef std::list<HmiState::StateID> StateIDList;
- /**
- * @brief active_states_ list of active temporary states(system events)
- */
StateIDList active_states_;
mutable sync_primitives::Lock active_states_lock_;
std::map<uint32_t, HmiStatePtr> waiting_for_response_;
diff --git a/src/components/include/application_manager/state_controller.h b/src/components/include/application_manager/state_controller.h
index dc9e8b6c5d..2fa4b0c218 100644
--- a/src/components/include/application_manager/state_controller.h
+++ b/src/components/include/application_manager/state_controller.h
@@ -192,6 +192,18 @@ class StateController {
virtual void OnVideoStreamingStopped(ApplicationConstSharedPtr app) = 0;
/**
+ * @brief OnStateChanged send HMIStatusNotification if needed
+ * @param app application
+ * @param window_id id of applicaion's window to apply HMI state
+ * @param old_state state before change
+ * @param new_state state after change
+ */
+ virtual void OnStateChanged(ApplicationSharedPtr app,
+ const WindowID window_id,
+ HmiStatePtr old_state,
+ HmiStatePtr new_state) = 0;
+
+ /**
* @brief Checks activity of Deactivate HMI state.
* @return Returns TRUE if deactivate HMI state is active, otherwise returns
* FALSE.
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 ae4deb8a46..545090bf30 100644
--- a/src/components/include/test/application_manager/mock_state_controller.h
+++ b/src/components/include/test/application_manager/mock_state_controller.h
@@ -100,7 +100,11 @@ class MockStateController : public am::StateController {
void(am::ApplicationConstSharedPtr app));
MOCK_METHOD1(OnVideoStreamingStopped,
void(am::ApplicationConstSharedPtr app));
-
+ MOCK_METHOD4(OnStateChanged,
+ void(am::ApplicationSharedPtr app,
+ const am::WindowID window_id,
+ am::HmiStatePtr old_state,
+ am::HmiStatePtr new_state));
MOCK_CONST_METHOD1(IsStateActive, bool(am::HmiState::StateID state_id));
MOCK_METHOD1(ActivateDefaultWindow, void(am::ApplicationSharedPtr app));
MOCK_METHOD1(ExitDefaultWindow, void(am::ApplicationSharedPtr app));