From 1d02c4bce59b2ea051bb59a31a21ea7d7c0eea84 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Sun, 10 Jun 2018 23:48:46 +0900 Subject: Change function according to e9376b Change-Id: I56204f42b6b083cd2e180a4b336f876704e287aa Signed-off-by: Kazumasa Mitsunari --- src/app.cpp | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index 64a1835..1422750 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -574,8 +574,15 @@ WMError App::do_transition(unsigned req_num) * Check Policy */ // get current trigger - auto trigger = app_list->getRequest(req_num); + bool found; bool is_activate = true; + auto trigger = 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 @@ -608,8 +615,14 @@ WMError App::do_transition(unsigned req_num) // layer manager task bool sync_draw_happen = false; - for (const auto &y : app_list->getActions(req_num)) + for (const auto &y : 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); */ @@ -873,10 +886,13 @@ void App::api_activate_surface(char const *appid, char const *drawing_name, char auto client = app_list->lookUpClient(id); unsigned srfc = client->surfaceID(role); - if(srfc != INVALID_SURFACE_ID){ - // remove floating surface - app_list->removeFloatingSurface(client->surfaceID(role)); + if(srfc == INVALID_SURFACE_ID){ + HMI_ERROR("wm", "role should be set with surface"); + reply("role should be set with surface"); + return; } + app_list->removeFloatingSurface(client->surfaceID(role)); + /* * Queueing Phase */ @@ -1013,7 +1029,15 @@ void App::lm_enddraw(const char *drawing_name) void App::do_enddraw(unsigned req_num) { // get actions - auto actions = app_list->getActions(req_num); + bool found; + auto actions = 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) -- cgit 1.2.3-korg