aboutsummaryrefslogtreecommitdiffstats
path: root/src/policy_manager
diff options
context:
space:
mode:
Diffstat (limited to 'src/policy_manager')
-rw-r--r--src/policy_manager/zipc/dummy_stm.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/policy_manager/zipc/dummy_stm.c b/src/policy_manager/zipc/dummy_stm.c
index fc92c3e..2e31712 100644
--- a/src/policy_manager/zipc/dummy_stm.c
+++ b/src/policy_manager/zipc/dummy_stm.c
@@ -126,6 +126,7 @@ stm_state_t g_crr_state;
stm_state_t g_prv_state;
int g_prv_restriction_state_car_stop = 0;
int g_prv_apps_state_car_stop = 0;
+int g_map_is_activated = STM_FALSE;
void stmInitialize() {
// Initialize previous state
@@ -271,8 +272,10 @@ int stmTransitionState(int event, stm_state_t* state) {
// Update apps layer
g_prv_apps_state_car_stop = apps_state;
- g_crr_state.layer.apps.state = gStmLayoutNoM1;
- g_crr_state.layer.apps.is_changed = STM_TRUE;
+ if (STM_TRUE == g_map_is_activated) {
+ g_crr_state.layer.apps.state = gStmLayoutNoM1;
+ g_crr_state.layer.apps.is_changed = STM_TRUE;
+ }
}
}
else {
@@ -286,8 +289,10 @@ int stmTransitionState(int event, stm_state_t* state) {
g_crr_state.layer.restriction.is_changed = STM_TRUE;
// Update apps layer
- g_crr_state.layer.apps.state = g_prv_apps_state_car_stop;
- g_crr_state.layer.apps.is_changed = STM_TRUE;
+ if (STM_TRUE == g_map_is_activated) {
+ g_crr_state.layer.apps.state = g_prv_apps_state_car_stop;
+ g_crr_state.layer.apps.is_changed = STM_TRUE;
+ }
}
}
}
@@ -538,5 +543,13 @@ int stmTransitionState(int event, stm_state_t* state) {
// Copy current state for return
memcpy(state, &g_crr_state, sizeof(g_crr_state));
+ if ((STM_FALSE == g_map_is_activated)
+ && (STM_TRUE == g_crr_state.layer.apps.is_changed)
+ && ((gStmLayoutNoM1 == g_crr_state.layer.apps.state)
+ || (gStmLayoutNoM2 == g_crr_state.layer.apps.state)
+ || (gStmLayoutNoMf == g_crr_state.layer.apps.state))) {
+ g_map_is_activated = STM_TRUE;
+ }
+
return 0;
}