Change function according to 1476fb
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Sun, 10 Jun 2018 14:48:46 +0000 (23:48 +0900)
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Tue, 12 Jun 2018 01:30:40 +0000 (10:30 +0900)
Change-Id: I372040dded0fd38139b3d8b2ebd0d8988d12e8f1
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
src/app.cpp

index db00dea..d11ec8a 100644 (file)
@@ -572,8 +572,15 @@ WMError App::do_transition(unsigned req_num)
     * Check Policy
     */
     // get current trigger
-    auto trigger = g_app_list.getRequest(req_num);
+    bool found;
     bool is_activate = true;
+    auto trigger = g_app_list.getRequest(req_num, &found);
+    if(!found)
+    {
+        WMError err = WMError::NO_ENTRY;
+        HMI_SEQ_ERROR(req_num, errorDescription(err));
+        return err;
+    }
 
     /*  get new status from Policy Manager
 
@@ -606,8 +613,14 @@ WMError App::do_transition(unsigned req_num)
 
     // layer manager task
     bool sync_draw_happen = false;
-    for (const auto &y : g_app_list.getActions(req_num))
+    for (const auto &y : g_app_list.getActions(req_num, &found))
     {
+        if (!found)
+        {
+            WMError err = WMError::NO_ENTRY;
+            HMI_SEQ_ERROR(req_num, "%s : Action is not set", errorDescription(err));
+            return err;
+        }
         /*
         do_task(y);
         */
@@ -1006,7 +1019,15 @@ void App::lm_enddraw(const char *drawing_name)
 void App::do_enddraw(unsigned req_num)
 {
     // get actions
-    auto actions = g_app_list.getActions(req_num);
+    bool found;
+    auto actions = g_app_list.getActions(req_num, &found);
+    if (!found)
+    {
+        WMError err = WMError::NO_ENTRY;
+        HMI_SEQ_ERROR(req_num, errorDescription(err));
+        return;
+    }
+
     HMI_SEQ_INFO(req_num, "do endDraw");
 
     for (const auto &act : actions)