Bugfix: Restriction app is displayed on Dashboard app when steping on foot brake sandbox/yuta-d/add_api_get_car_info
authorYuta Doi <yuta-d@witz-inc.co.jp>
Wed, 23 May 2018 05:03:31 +0000 (14:03 +0900)
committerYuta Doi <yuta-d@witz-inc.co.jp>
Wed, 23 May 2018 05:07:53 +0000 (14:07 +0900)
Change-Id: Ic4b2cd4769abf90c07d2c7e9c7961d3cae40202e
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
src/policy_manager/zipc/dummy_stm.c

index 2e31712..cc3fe21 100644 (file)
@@ -465,8 +465,10 @@ int stmTransitionState(int event, stm_state_t* state) {
                 case STM_ARA_NO_RESTRICTION_NORMAL:
                     switch (restriction_state) {
                     case gStmLayoutNoNone:
-                        g_crr_state.layer.restriction.state = gStmLayoutNoRestriction;
-                        g_crr_state.layer.restriction.is_changed = STM_TRUE;
+                        if (g_crr_state.layer.apps.state == gStmLayoutNoS1) {
+                            g_crr_state.layer.restriction.state = gStmLayoutNoRestriction;
+                            g_crr_state.layer.restriction.is_changed = STM_TRUE;
+                        }
                         break;
                     default:
                         // nop
@@ -487,8 +489,10 @@ int stmTransitionState(int event, stm_state_t* state) {
                 case STM_ARA_NO_RESTRICTION_SPLIT_SUB:
                     switch (restriction_state) {
                     case gStmLayoutNoNone:
-                        g_crr_state.layer.restriction.state = gStmLayoutNoRestrictionSplitSub;
-                        g_crr_state.layer.restriction.is_changed = STM_TRUE;
+                        if (g_crr_state.layer.apps.state == gStmLayoutNoM2) {
+                            g_crr_state.layer.restriction.state = gStmLayoutNoRestrictionSplitSub;
+                            g_crr_state.layer.restriction.is_changed = STM_TRUE;
+                        }
                         break;
                     default:
                         // nop