aboutsummaryrefslogtreecommitdiffstats
path: root/src/policy_manager/zipc
diff options
context:
space:
mode:
Diffstat (limited to 'src/policy_manager/zipc')
-rw-r--r--src/policy_manager/zipc/dummy_stm.c65
-rw-r--r--src/policy_manager/zipc/dummy_stm.h4
2 files changed, 67 insertions, 2 deletions
diff --git a/src/policy_manager/zipc/dummy_stm.c b/src/policy_manager/zipc/dummy_stm.c
index 3be9964..1a0a8d8 100644
--- a/src/policy_manager/zipc/dummy_stm.c
+++ b/src/policy_manager/zipc/dummy_stm.c
@@ -46,6 +46,7 @@ const char* gStmCategoryName[] = {
"popup",
"system_alert",
"restriction",
+ "system",
};
const int gStmCategoryNo[] = {
@@ -56,6 +57,7 @@ const int gStmCategoryNo[] = {
STM_CTG_NO_POPUP,
STM_CTG_NO_SYSTEM_ALERT,
STM_CTG_NO_RESTRICTION,
+ STM_CTG_NO_SYSTEM,
};
const char* gStmAreaName[] = {
@@ -130,6 +132,7 @@ const char* gStmLayoutNo2Name[] = {
"restriction",
"restriction.split.main",
"restriction.split.sub",
+ "system",
};
stm_state_t g_crr_state;
@@ -304,7 +307,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) {
+ if ((STM_TRUE == g_map_is_activated)
+ && (gStmLayoutNoSystem != apps_state)) {
g_crr_state.layer.apps.state = gStmLayoutNoM1;
g_crr_state.layer.apps.is_changed = STM_TRUE;
}
@@ -405,6 +409,25 @@ int stmTransitionState(int event, stm_state_t* state) {
break;
}
break;
+ case STM_CTG_NO_SYSTEM:
+ switch (area_no) {
+ case STM_ARA_NO_NORMAL:
+ // Apps layer
+ switch (apps_state) {
+ case gStmLayoutNoMf:
+ // nop
+ break;
+ default:
+ g_crr_state.layer.apps.state = gStmLayoutNoSystem;
+ g_crr_state.layer.apps.is_changed = STM_TRUE;
+ break;
+ }
+ break;
+ default:
+ // nop
+ break;
+ }
+ break;
case STM_CTG_NO_SPLITABLE:
switch (area_no) {
case STM_ARA_NO_NORMAL:
@@ -475,6 +498,46 @@ int stmTransitionState(int event, stm_state_t* state) {
}
break;
}
+ else { // (gStmRestrictionModeStateNoOn == restriction_mode_state)
+ switch (category_no) {
+ case STM_CTG_NO_MAP:
+ switch (area_no) {
+ case STM_ARA_NO_FULL:
+ case STM_ARA_NO_NORMAL:
+ case STM_ARA_NO_SPLIT_MAIN:
+ // Apps layer
+ switch (apps_state) {
+ case gStmLayoutNoM1:
+ // nop
+ break;
+ default:
+ g_crr_state.layer.apps.state = gStmLayoutNoM1;
+ g_crr_state.layer.apps.is_changed = STM_TRUE;
+ }
+ break;
+ }
+ break;
+ case STM_CTG_NO_SYSTEM:
+ switch (area_no) {
+ case STM_ARA_NO_NORMAL:
+ // Apps layer
+ switch (apps_state) {
+ case gStmLayoutNoMf:
+ // nop
+ break;
+ default:
+ g_crr_state.layer.apps.state = gStmLayoutNoSystem;
+ g_crr_state.layer.apps.is_changed = STM_TRUE;
+ break;
+ }
+ break;
+ default:
+ // nop
+ break;
+ }
+ break;
+ }
+ }
case STM_EVT_NO_DEACTIVATE:
switch (category_no) {
default:
diff --git a/src/policy_manager/zipc/dummy_stm.h b/src/policy_manager/zipc/dummy_stm.h
index e848628..5e7ac70 100644
--- a/src/policy_manager/zipc/dummy_stm.h
+++ b/src/policy_manager/zipc/dummy_stm.h
@@ -48,6 +48,7 @@
#define STM_CTG_NO_POPUP 0x0500
#define STM_CTG_NO_SYSTEM_ALERT 0x0600
#define STM_CTG_NO_RESTRICTION 0x0700
+#define STM_CTG_NO_SYSTEM 0x0800
// Area number
#define STM_ARA_NO_FULL 0x010000
@@ -66,7 +67,7 @@
// Number of events, categories and areas
#define STM_NUM_EVT 15
-#define STM_NUM_CTG 7
+#define STM_NUM_CTG 8
#define STM_NUM_ARA 8
// Enum for state
@@ -119,6 +120,7 @@ enum stm_layout_ {
gStmLayoutNoRestriction,
gStmLayoutNoRestrictionSplitMain,
gStmLayoutNoRestrictionSplitSub,
+ gStmLayoutNoSystem,
};