aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-10 23:48:46 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-11 09:01:10 +0900
commit1d02c4bce59b2ea051bb59a31a21ea7d7c0eea84 (patch)
tree6c414520c4f23eed7a647e6473bb6438ececf5ac
parent99a518fc7038da140fc95b56f7e415a03cc2d4e5 (diff)
Change function according to e9376b
Change-Id: I56204f42b6b083cd2e180a4b336f876704e287aa Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/app.cpp36
1 files 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)