The role "video" can be shown in split area for ALS
authorYuta Doi <yuta-d@witz-inc.co.jp>
Fri, 11 May 2018 01:09:24 +0000 (10:09 +0900)
committerYuta Doi <yuta-d@witz-inc.co.jp>
Fri, 11 May 2018 01:09:24 +0000 (10:09 +0900)
and the role "restriction" can use the areas other than "restriction.split.sub"

Change-Id: I5aab163409cf5284b876dc9e44102ee620344472
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
src/app.cpp
src/policy_manager/db/role.db
src/policy_manager/policy_manager.cpp
src/policy_manager/zipc/dummy_stm.c

index 0242240..07aab0b 100644 (file)
@@ -287,21 +287,26 @@ void App::allocateWindowResource(char const *event, char const *drawing_name,
         // This process will be removed
         // because the area "normal.full" and "normalfull" will be prohibited
         {
-            if (nullptr == drawing_area) {
-                new_area = "normal";
-            }
-            else if (0 == strcmp("normal.full", drawing_area)) {
-                new_area = "normal";
-            }
-            else if (0 == strcmp("restriction.split.sub", drawing_area)) {
-                new_area = "restriction.split.sub";
-            }
-            else if (0 == strcmp("homescreen", new_role)) {
-                // Now homescreen specifies "normalfull"
-                new_area = "full";
+            if (0 == strcmp("Restriction", drawing_name)) {
+                new_area = drawing_area;
             }
             else {
-                new_area = "normal";
+                if (nullptr == drawing_area) {
+                    new_area = "normal";
+                }
+                else if (0 == strcmp("normal.full", drawing_area)) {
+                    new_area = "normal";
+                }
+                else if (0 == strcmp("restriction.split.sub", drawing_area)) {
+                    new_area = "restriction.split.sub";
+                }
+                else if (0 == strcmp("homescreen", new_role)) {
+                    // Now homescreen specifies "normalfull"
+                    new_area = "full";
+                }
+                else {
+                    new_area = "normal";
+                }
             }
             HMI_DEBUG("wm", "drawing_area:%s, new_area: %s", drawing_area, new_area);
         }
index 6c5d715..1c314b0 100644 (file)
@@ -17,8 +17,9 @@
     },
     {
         "category": "general",
-        "role": "launcher | poi | music | video | browser | sdl | settings | mixer | radio | hvac | dashboard | debug",
+        "role": "launcher | poi | music | browser | sdl | settings | mixer | radio | hvac | dashboard | debug",
         "area": "normal",
+        "description": "For ALS, role:video is moved to category:splitable",
     },
     {
         "category": "phone",
@@ -27,8 +28,9 @@
     },
     {
         "category": "splitable",
-        "role": "splitable1 | splitable2",
+        "role": "splitable1 | splitable2 | video",
         "area": "normal | split.main | split.sub",
+        "description": "For ALS, role:video is included here",
     },
     {
         "category": "popup",
index 3ee9459..8b902b2 100644 (file)
@@ -179,6 +179,10 @@ int PolicyManager::checkPolicy(json_object* json_in, json_object** json_out) {
     //         },
     json_object* json_layer = json_object_new_array();
     json_object* json_tmp = json_object_new_object();
+    HMI_DEBUG("wm", "on_screen state (is_changed:%d state:%d:%s)",
+              this->current_state_.layer.on_screen.is_changed,
+              this->current_state_.layer.on_screen.state,
+              stm::gStmLayoutNo2Name[this->current_state_.layer.on_screen.state]);
     this->addStateToJson("on_screen",
                          this->current_state_.layer.on_screen.is_changed,
                          stm::gStmLayoutNo2Name[this->current_state_.layer.on_screen.state],
@@ -191,6 +195,10 @@ int PolicyManager::checkPolicy(json_object* json_in, json_object** json_out) {
     //                 "state": <const char*>
     //             }
     //         },
+    HMI_DEBUG("wm", "restriction state (is_changed:%d state:%d:%s)",
+              this->current_state_.layer.restriction.is_changed,
+              this->current_state_.layer.restriction.state,
+              stm::gStmLayoutNo2Name[this->current_state_.layer.restriction.state]);
     json_tmp = json_object_new_object();
     this->addStateToJson("restriction",
                          this->current_state_.layer.restriction.is_changed,
@@ -204,6 +212,10 @@ int PolicyManager::checkPolicy(json_object* json_in, json_object** json_out) {
     //                 "state": <const char*>
     //             }
     //         },
+    HMI_DEBUG("wm", "apps state (is_changed:%d state:%d:%s)",
+              this->current_state_.layer.apps.is_changed,
+              this->current_state_.layer.apps.state,
+              stm::gStmLayoutNo2Name[this->current_state_.layer.apps.state]);
     json_tmp = json_object_new_object();
     this->addStateToJson("apps",
                          this->current_state_.layer.apps.is_changed,
@@ -219,6 +231,10 @@ int PolicyManager::checkPolicy(json_object* json_in, json_object** json_out) {
     //         },
     //     ]
     // }
+    HMI_DEBUG("wm", "homescreen state (is_changed:%d state:%d:%s)",
+              this->current_state_.layer.homescreen.is_changed,
+              this->current_state_.layer.homescreen.state,
+              stm::gStmLayoutNo2Name[this->current_state_.layer.homescreen.state]);
     json_tmp = json_object_new_object();
     this->addStateToJson("homescreen",
                          this->current_state_.layer.homescreen.is_changed,
index 07694cf..0246141 100644 (file)
@@ -226,12 +226,13 @@ int stmTransitionState(int event, stm_state_t* state) {
             case STM_ARA_NO_NORMAL:
                 // Apps layer
                 switch (apps_state) {
-                case gStmLayoutNoMf:
-                    // nop
+                case gStmLayoutNoM1:
+                    g_crr_state.layer.apps.state = gStmLayoutNoM2;
+                    g_crr_state.layer.apps.is_changed = STM_TRUE;
                     break;
+                case gStmLayoutNoMf:
                 case gStmLayoutNoS1:
-                    g_crr_state.layer.apps.state = gStmLayoutNoS2;
-                    g_crr_state.layer.apps.is_changed = STM_TRUE;
+                    // nop
                     break;
                 default:
                     g_crr_state.layer.apps.state = gStmLayoutNoS1;