diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-06-22 10:34:09 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-06-22 10:34:09 +0900 |
commit | dd47ecbc82af642be551a660ba586ea5cbf244b5 (patch) | |
tree | 680ce22ddf2bc14235cb4d9e036a6256c39033a6 | |
parent | 6229e56414c62cbe21c2d3242900b09ff86a21a5 (diff) |
Modify layout name
Change-Id: Ia58664efc1924e04a026ed0dd6c16c8a90e4c2e0
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
-rw-r--r-- | src/layout_manager/db/layout.db | 102 | ||||
-rw-r--r-- | src/policy_manager/zipc/dummy_stm.c | 130 | ||||
-rw-r--r-- | src/policy_manager/zipc/dummy_stm.h | 31 |
3 files changed, 107 insertions, 156 deletions
diff --git a/src/layout_manager/db/layout.db b/src/layout_manager/db/layout.db index 29e40c8..ae482b5 100644 --- a/src/layout_manager/db/layout.db +++ b/src/layout_manager/db/layout.db @@ -1,27 +1,17 @@ { "layouts": [ { - "name": "pu", - "layer": "on_screen", - "areas": [ - { - "name": "pop_up", - "category": "pop_up" - } - ] - }, - { - "name": "sa", - "layer": "on_screen", + "name": "homescreen", + "layer": "far_homescreen", "areas": [ { - "name": "system_alert", - "category": "system_alert" + "name": "fullscreen", + "category": "homescreen" } ] }, { - "name": "m1", + "name": "map.normal", "layer": "apps", "areas": [ { @@ -31,7 +21,7 @@ ] }, { - "name": "m2", + "name": "map.split", "layer": "apps", "areas": [ { @@ -45,7 +35,7 @@ ] }, { - "name": "mf", + "name": "map.fullscreen", "layer": "apps", "areas": [ { @@ -55,7 +45,7 @@ ] }, { - "name": "s1", + "name": "splitable.normal", "layer": "apps", "areas": [ { @@ -65,7 +55,7 @@ ] }, { - "name": "s2", + "name": "splitable.split", "layer": "apps", "areas": [ { @@ -79,7 +69,7 @@ ] }, { - "name": "g", + "name": "general.normal", "layer": "apps", "areas": [ { @@ -89,7 +79,7 @@ ] }, { - "name": "system", + "name": "system.normal", "layer": "apps", "areas": [ { @@ -99,27 +89,17 @@ ] }, { - "name": "hs", - "layer": "homescreen", - "areas": [ - { - "name": "fullscreen", - "category": "homescreen" - } - ] - }, - { - "name": "system_alert", - "layer": "on_screen", + "name": "software_keyboard", + "layer": "near_homescreen", "areas": [ { - "name": "system_alert", - "category": "system_alert" + "name": "software_keyboard", + "category": "software_keyboard" } ] }, { - "name": "restriction", + "name": "restriction.normal", "layer": "restriction", "areas": [ { @@ -149,56 +129,22 @@ ] }, { - "name": "software_keyboard", - "layer": "near_homescreen", - "areas": [ - { - "name": "software_keyboard", - "category": "software_keyboard" - } - ] - }, - { - "name": "applications.map", - "layer": "apps", - "areas": [ - { - "name": "normal", - "category": "map" - } - ] - }, - { - "name": "applications.map_split", - "layer": "apps", - "areas": [ - { - "name": "split.main", - "category": "map" - }, - { - "name": "split.sub", - "category": "general" - } - ] - }, - { - "name": "general", - "layer": "apps", + "name": "pop_up", + "layer": "on_screen", "areas": [ { - "name": "normal", - "category": "general" + "name": "pop_up", + "category": "pop_up" } ] }, { - "name": "far_homescreen", - "layer": "far_homescreen", + "name": "system_alert", + "layer": "on_screen", "areas": [ { - "name": "fullscreen", - "category": "homescreen" + "name": "system_alert", + "category": "system_alert" } ] } diff --git a/src/policy_manager/zipc/dummy_stm.c b/src/policy_manager/zipc/dummy_stm.c index 0b2120a..c3fb1c4 100644 --- a/src/policy_manager/zipc/dummy_stm.c +++ b/src/policy_manager/zipc/dummy_stm.c @@ -122,19 +122,19 @@ const char* gStmRestrictionModeStateName[] = { const char* gStmLayoutName[] = { "none", - "pu", - "sa", - "m1", - "m2", - "mf", - "s1", - "s2", - "g", - "hs", - "restriction", + "pop_up", + "system_alert", + "map.normal", + "map.split", + "map.fullscreen", + "splitable.normal", + "splitable.split", + "general.normal", + "homescreen", + "restriction.normal", "restriction.split.main", "restriction.split.sub", - "system", + "system.normal", }; const char* gStmLayerName[] = { @@ -344,8 +344,8 @@ int stmTransitionState(int event, stm_state_t* state) { // Update apps layer g_prv_apps_state_car_stop = apps_state; if ((STM_TRUE == g_map_is_activated) - && (gStmLayoutNoSystem != apps_state)) { - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM1; + && (gStmLayoutNoSysNml != apps_state)) { + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMapNml; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; } } @@ -379,7 +379,7 @@ int stmTransitionState(int event, stm_state_t* state) { switch (category_no) { case STM_CTG_NO_HOMESCREEN: // Homescreen layer - g_crr_state.layer[gStmLayerNoHomescreen].state = gStmLayoutNoHs; + g_crr_state.layer[gStmLayerNoHomescreen].state = gStmLayoutNoHms; g_crr_state.layer[gStmLayerNoHomescreen].changed = STM_TRUE; // Apps layer @@ -393,11 +393,11 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_FULL: // Apps layer switch (apps_state) { - case gStmLayoutNoMf: + case gStmLayoutNoMapFll: // nop break; default: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMf; + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMapFll; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; } @@ -405,24 +405,24 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_NORMAL: // Apps layer switch (apps_state) { - case gStmLayoutNoM1: + case gStmLayoutNoMapNml: // nop break; - case gStmLayoutNoS1: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM2; + case gStmLayoutNoSplNml: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMapSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; default: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM1; + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMapNml; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; } break; case STM_ARA_NO_SPLIT_MAIN: // Apps layer switch (apps_state) { - case gStmLayoutNoS1: - case gStmLayoutNoS2: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2; + case gStmLayoutNoSplNml: + case gStmLayoutNoSplSpl: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSplSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; default: @@ -437,11 +437,11 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_NORMAL: // Apps layer switch (apps_state) { - case gStmLayoutNoMf: + case gStmLayoutNoMapFll: // nop break; default: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoG; + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoGenNml; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; } @@ -456,11 +456,11 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_NORMAL: // Apps layer switch (apps_state) { - case gStmLayoutNoMf: + case gStmLayoutNoMapFll: // nop break; default: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSystem; + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSysNml; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; } @@ -475,16 +475,16 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_NORMAL: // Apps layer switch (apps_state) { - case gStmLayoutNoM1: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM2; + case gStmLayoutNoMapNml: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMapSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; - case gStmLayoutNoMf: - case gStmLayoutNoS1: + case gStmLayoutNoMapFll: + case gStmLayoutNoSplNml: // nop break; default: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS1; + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSplNml; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; } @@ -492,12 +492,12 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_SPLIT_MAIN: // Apps layer switch (apps_state) { - case gStmLayoutNoS1: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2; + case gStmLayoutNoSplNml: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSplSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; - case gStmLayoutNoS2: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2; + case gStmLayoutNoSplSpl: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSplSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; default: @@ -508,20 +508,20 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_SPLIT_SUB: // Apps layer switch (apps_state) { - case gStmLayoutNoM1: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM2; + case gStmLayoutNoMapNml: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMapSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; - case gStmLayoutNoM2: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM2; + case gStmLayoutNoMapSpl: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMapSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; - case gStmLayoutNoS1: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2; + case gStmLayoutNoSplNml: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSplSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; - case gStmLayoutNoS2: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoS2; + case gStmLayoutNoSplSpl: + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSplSpl; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; default: @@ -549,11 +549,11 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_SPLIT_MAIN: // Apps layer switch (apps_state) { - case gStmLayoutNoM1: + case gStmLayoutNoMapNml: // nop break; default: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoM1; + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoMapNml; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; } break; @@ -564,11 +564,11 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_NORMAL: // Apps layer switch (apps_state) { - case gStmLayoutNoMf: + case gStmLayoutNoMapFll: // nop break; default: - g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSystem; + g_crr_state.layer[gStmLayerNoApps].state = gStmLayoutNoSysNml; g_crr_state.layer[gStmLayerNoApps].changed = STM_TRUE; break; } @@ -601,8 +601,8 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_RESTRICTION_NORMAL: switch (restriction_state) { case gStmLayoutNoNone: - if (g_crr_state.layer[gStmLayerNoApps].state == gStmLayoutNoS1) { - g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestriction; + if (g_crr_state.layer[gStmLayerNoApps].state == gStmLayoutNoSplNml) { + g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRstNml; g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE; } break; @@ -614,7 +614,7 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_RESTRICTION_SPLIT_MAIN: switch (restriction_state) { case gStmLayoutNoNone: - g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestrictionSplitMain; + g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRstSplMain; g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE; break; default: @@ -625,8 +625,8 @@ int stmTransitionState(int event, stm_state_t* state) { case STM_ARA_NO_RESTRICTION_SPLIT_SUB: switch (restriction_state) { case gStmLayoutNoNone: - if (g_crr_state.layer[gStmLayerNoApps].state == gStmLayoutNoM2) { - g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestrictionSplitSub; + if (g_crr_state.layer[gStmLayerNoApps].state == gStmLayoutNoMapSpl) { + g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRstSplSub; g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE; } break; @@ -643,9 +643,9 @@ int stmTransitionState(int event, stm_state_t* state) { } else if (STM_EVT_NO_DEACTIVATE == event_no) { switch (restriction_state) { - case gStmLayoutNoRestriction: - case gStmLayoutNoRestrictionSplitMain: - case gStmLayoutNoRestrictionSplitSub: + case gStmLayoutNoRstNml: + case gStmLayoutNoRstSplMain: + case gStmLayoutNoRstSplSub: g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoNone; g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE; break; @@ -657,12 +657,12 @@ int stmTransitionState(int event, stm_state_t* state) { } else if (g_crr_state.layer[gStmLayerNoApps].changed) { if (gStmLightstatusBrakeStateNoOff == g_crr_state.car_element[gStmCarElementNoLightstatusBrake].state) { - if (gStmLayoutNoM2 == g_crr_state.layer[gStmLayerNoApps].state) { - g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestrictionSplitSub; + if (gStmLayoutNoMapSpl == g_crr_state.layer[gStmLayerNoApps].state) { + g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRstSplSub; g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE; } - else if (gStmLayoutNoS1 == g_crr_state.layer[gStmLayerNoApps].state) { - g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRestriction; + else if (gStmLayoutNoSplNml == g_crr_state.layer[gStmLayerNoApps].state) { + g_crr_state.layer[gStmLayerNoRestriction].state = gStmLayoutNoRstNml; g_crr_state.layer[gStmLayerNoRestriction].changed = STM_TRUE; } else { @@ -685,7 +685,7 @@ int stmTransitionState(int event, stm_state_t* state) { if (STM_EVT_NO_ACTIVATE == event_no) { switch (on_screen_state) { case gStmLayoutNoNone: - g_crr_state.layer[gStmLayerNoOnScreen].state = gStmLayoutNoPu; + g_crr_state.layer[gStmLayerNoOnScreen].state = gStmLayoutNoPopUp; g_crr_state.layer[gStmLayerNoOnScreen].changed = STM_TRUE; break; default: @@ -695,7 +695,7 @@ int stmTransitionState(int event, stm_state_t* state) { } else if (STM_EVT_NO_DEACTIVATE == event_no) { switch (on_screen_state) { - case gStmLayoutNoPu: + case gStmLayoutNoPopUp: g_crr_state.layer[gStmLayerNoOnScreen].state = gStmLayoutNoNone; g_crr_state.layer[gStmLayerNoOnScreen].changed = STM_TRUE; break; @@ -711,9 +711,9 @@ int stmTransitionState(int event, stm_state_t* state) { if ((STM_FALSE == g_map_is_activated) && (STM_TRUE == g_crr_state.layer[gStmLayerNoApps].changed) - && ((gStmLayoutNoM1 == g_crr_state.layer[gStmLayerNoApps].state) - || (gStmLayoutNoM2 == g_crr_state.layer[gStmLayerNoApps].state) - || (gStmLayoutNoMf == g_crr_state.layer[gStmLayerNoApps].state))) { + && ((gStmLayoutNoMapNml == g_crr_state.layer[gStmLayerNoApps].state) + || (gStmLayoutNoMapSpl == g_crr_state.layer[gStmLayerNoApps].state) + || (gStmLayoutNoMapFll == g_crr_state.layer[gStmLayerNoApps].state))) { g_map_is_activated = STM_TRUE; } diff --git a/src/policy_manager/zipc/dummy_stm.h b/src/policy_manager/zipc/dummy_stm.h index d2893ca..5dd0bcc 100644 --- a/src/policy_manager/zipc/dummy_stm.h +++ b/src/policy_manager/zipc/dummy_stm.h @@ -104,19 +104,24 @@ enum stm_restriction_mode_state_ { enum stm_layout_ { gStmLayoutNoNone = 0, - gStmLayoutNoPu, - gStmLayoutNoSa, - gStmLayoutNoM1, - gStmLayoutNoM2, - gStmLayoutNoMf, - gStmLayoutNoS1, - gStmLayoutNoS2, - gStmLayoutNoG, - gStmLayoutNoHs, - gStmLayoutNoRestriction, - gStmLayoutNoRestrictionSplitMain, - gStmLayoutNoRestrictionSplitSub, - gStmLayoutNoSystem, + gStmLayoutNoPopUp, + gStmLayoutNoSysAlt, + gStmLayoutNoMapNml, + gStmLayoutNoMapSpl, + gStmLayoutNoMapFll, + gStmLayoutNoSplNml, + gStmLayoutNoSplSpl, + gStmLayoutNoGenNml, + gStmLayoutNoHms, + gStmLayoutNoRstNml, + gStmLayoutNoRstSplMain, + gStmLayoutNoRstSplSub, + gStmLayoutNoSysNml, + + gStmLayoutNoNum, + + gStmLayoutNoMin = gStmLayoutNoNone, + gStmLayoutNoMax = gStmLayoutNoNum - 1, }; enum stm_event_ { |