2 * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include "window_manager.hpp"
21 #include "json_helper.hpp"
22 #include "applist.hpp"
26 #include <systemd/sd-event.h>
31 using std::unordered_map;
36 static const uint64_t kTimeOut = 3ULL; /* 3s */
38 /* DrawingArea name used by "{layout}.{area}" */
39 const char kNameLayoutNormal[] = "normal";
40 const char kNameLayoutSplit[] = "split";
41 const char kNameAreaFull[] = "full";
42 const char kNameAreaMain[] = "main";
43 const char kNameAreaSub[] = "sub";
45 /* Key for json obejct */
46 const char kKeyDrawingName[] = "drawing_name";
47 const char kKeyDrawingArea[] = "drawing_area";
48 const char kKeyDrawingRect[] = "drawing_rect";
49 const char kKeyX[] = "x";
50 const char kKeyY[] = "y";
51 const char kKeyWidth[] = "width";
52 const char kKeyHeight[] = "height";
53 const char kKeyWidthPixel[] = "width_pixel";
54 const char kKeyHeightPixel[] = "height_pixel";
55 const char kKeyWidthMm[] = "width_mm";
56 const char kKeyHeightMm[] = "height_mm";
57 const char kKeyScale[] = "scale";
58 const char kKeyIds[] = "ids";
60 static const vector<string> kListEventName{
70 static sd_event_source *g_timer_ev_src = nullptr;
71 static AppList g_app_list;
72 static WindowManager *g_context;
73 static vector<string> white_list_area_size_change = {
74 "homescreen", "settings"
80 static int processTimerHandler(sd_event_source *s, uint64_t usec, void *userdata)
82 HMI_NOTICE("Time out occurs because the client replys endDraw slow, so revert the request");
83 reinterpret_cast<wm::WindowManager *>(userdata)->timerHandler();
87 static void onStateTransitioned(vector<WMAction> actions)
89 g_context->startTransitionWrapper(actions);
94 g_context->processError(WMError::LAYOUT_CHANGE_FAIL);
101 WindowManager::WindowManager()
104 const char *path = getenv("AFM_APP_INSTALL_DIR");
107 HMI_ERROR("AFM_APP_INSTALL_DIR is not defined");
111 this->lc = std::make_shared<LayerControl>(root);
113 HMI_DEBUG("Layer Controller initialized");
116 int WindowManager::init()
118 LayerControlCallbacks lmcb;
119 lmcb.surfaceCreated = [&](unsigned pid, unsigned surface){
120 this->surface_created(surface);
122 lmcb.surfaceDestroyed = [&](unsigned surface){
123 this->surface_removed(surface);
126 if(this->lc->init(lmcb) != WMError::SUCCESS)
131 // Store my context for calling callback from PolicyManager
134 // Initialize PMWrapper
135 this->pmw.initialize();
137 // Register callback to PolicyManager
138 this->pmw.registerCallback(onStateTransitioned, onError);
140 // Make afb event for subscriber
141 for (int i = Event_ScreenUpdated; i < Event_Error; i++)
143 map_afb_event[kListEventName[i]] = afb_api_make_event(afbBindingV3root, kListEventName[i].c_str());
146 const struct rect css_bg = this->lc->getAreaSize("fullscreen");
147 Screen screen = this->lc->getScreenInfo();
148 rectangle dp_bg(screen.width(), screen.height());
150 dp_bg.set_aspect(static_cast<double>(css_bg.w) / css_bg.h);
151 dp_bg.fit(screen.width(), screen.height());
152 dp_bg.center(screen.width(), screen.height());
153 HMI_DEBUG("SCALING: CSS BG(%dx%d) -> DDP %dx%d,(%dx%d)",
154 css_bg.w, css_bg.h, dp_bg.left(), dp_bg.top(), dp_bg.width(), dp_bg.height());
156 double scale = static_cast<double>(dp_bg.height()) / css_bg.h;
157 this->lc->setupArea(dp_bg, scale);
162 result<int> WindowManager::api_request_surface(char const *appid, char const *drawing_name)
164 string str_id = appid;
165 string role = drawing_name;
168 if(!g_app_list.contains(str_id))
170 lid = this->lc->getNewLayerID(role);
173 // register drawing_name as fallback and make it displayed.
174 lid = this->lc->getNewLayerID(string("fallback"));
175 HMI_DEBUG("%s is not registered in layers.json, then fallback as normal app", role);
178 return Err<int>("Designated role does not match any role, fallback is disabled");
181 this->lc->createNewLayer(lid);
182 // add client into the db
183 g_app_list.addClient(str_id, lid, role);
186 // generate surface ID for ivi-shell application
187 auto rname = this->id_alloc.lookup(role);
190 // name does not exist yet, allocate surface id...
191 auto id = int(this->id_alloc.generate_id(role));
192 this->tmp_surface2app[id] = {str_id, lid};
194 auto client = g_app_list.lookUpClient(str_id);
195 client->registerSurface(id);
200 // Check currently registered drawing names if it is already there.
201 return Err<int>("Surface already present");
204 char const *WindowManager::api_request_surface(char const *appid, char const *drawing_name,
207 string str_id = appid;
208 string role = drawing_name;
210 unsigned sid = std::stol(ivi_id);
211 HMI_DEBUG("This API(requestSurfaceXDG) is for XDG Application using runXDG");
213 * IVI-shell doesn't send surface_size event via ivi-wm protocol
214 * if the application is using XDG surface.
215 * So WM has to set surface size with original size here
217 WMError ret = this->lc->setXDGSurfaceOriginSize(sid);
220 HMI_ERROR("%s", errorDescription(ret));
221 HMI_WARNING("The main user of this API is runXDG");
225 if(!g_app_list.contains(str_id))
227 unsigned l_id = this->lc->getNewLayerID(role);
230 // register drawing_name as fallback and make it displayed.
231 l_id = this->lc->getNewLayerID("fallback");
232 HMI_DEBUG("%s is not registered in layers.json, then fallback as normal app", role);
235 return "Designated role does not match any role, fallback is disabled";
238 this->lc->createNewLayer(l_id);
239 // add client into the db
240 g_app_list.addClient(str_id, l_id, role);
243 auto rname = this->id_alloc.lookup(role);
247 return "Surface already present";
250 // register pair drawing_name and ivi_id
251 this->id_alloc.register_name_id(role, sid);
253 auto client = g_app_list.lookUpClient(str_id);
254 client->addSurface(sid);
259 void WindowManager::api_activate_window(char const *appid, char const *drawing_name,
260 char const *drawing_area, const reply_func &reply)
263 string role = drawing_name;
264 string area = drawing_area;
266 if(!g_app_list.contains(id))
268 reply("app doesn't request 'requestSurface' or 'setRole' yet");
271 auto client = g_app_list.lookUpClient(id);
273 Task task = Task::TASK_ALLOCATE;
274 unsigned req_num = 0;
275 WMError ret = WMError::UNKNOWN;
277 ret = this->setRequest(id, role, area, task, &req_num);
279 if(ret != WMError::SUCCESS)
281 HMI_ERROR(errorDescription(ret));
282 reply("Failed to set request");
287 if (req_num != g_app_list.currentRequestNumber())
289 // Add request, then invoked after the previous task is finished
290 HMI_SEQ_DEBUG(req_num, "request is accepted");
295 ret = this->checkPolicy(req_num);
297 if (ret != WMError::SUCCESS)
300 HMI_SEQ_ERROR(req_num, errorDescription(ret));
301 g_app_list.removeRequest(req_num);
302 this->processNextRequest();
306 void WindowManager::api_deactivate_window(char const *appid, char const *drawing_name,
307 const reply_func &reply)
311 string role = drawing_name;
312 string area = ""; //drawing_area;
313 Task task = Task::TASK_RELEASE;
314 unsigned req_num = 0;
315 WMError ret = WMError::UNKNOWN;
317 ret = this->setRequest(id, role, area, task, &req_num);
319 if (ret != WMError::SUCCESS)
321 HMI_ERROR(errorDescription(ret));
322 reply("Failed to set request");
327 if (req_num != g_app_list.currentRequestNumber())
329 // Add request, then invoked after the previous task is finished
330 HMI_SEQ_DEBUG(req_num, "request is accepted");
335 ret = this->checkPolicy(req_num);
337 if (ret != WMError::SUCCESS)
340 HMI_SEQ_ERROR(req_num, errorDescription(ret));
341 g_app_list.removeRequest(req_num);
342 this->processNextRequest();
346 void WindowManager::api_enddraw(char const *appid, char const *drawing_name)
349 string role = drawing_name;
350 unsigned current_req = g_app_list.currentRequestNumber();
351 bool result = g_app_list.setEndDrawFinished(current_req, id, role);
355 HMI_ERROR("%s is not in transition state", id.c_str());
359 if (g_app_list.endDrawFullfilled(current_req))
361 // do task for endDraw
363 WMError ret = this->doEndDraw(current_req);
365 if(ret != WMError::SUCCESS)
367 //this->emit_error();
369 // Undo state of PolicyManager
370 this->pmw.undoState();
371 this->lc->undoUpdate();
373 this->emitScreenUpdated(current_req);
374 HMI_SEQ_INFO(current_req, "Finish request status: %s", errorDescription(ret));
376 g_app_list.removeRequest(current_req);
378 this->processNextRequest();
382 HMI_SEQ_INFO(current_req, "Wait other App call endDraw");
387 json_object* WindowManager::api_get_area_list()
389 json_object* ret = json_object_new_object();
390 json_object* jarray = json_object_new_array();
391 unordered_map<string, struct rect> area2size = this->lc->getAreaList();
392 for(const auto& area : area2size)
394 json_object* j = json_object_new_object();
395 json_object_object_add(j, "name", json_object_new_string(area.first.c_str()));
396 json_object* jrect = json_object_new_object();
397 json_object_object_add(jrect, "x", json_object_new_int(area.second.x));
398 json_object_object_add(jrect, "y", json_object_new_int(area.second.y));
399 json_object_object_add(jrect, "w", json_object_new_int(area.second.w));
400 json_object_object_add(jrect, "h", json_object_new_int(area.second.h));
401 json_object_object_add(j, "rect", jrect);
402 json_object_array_add(jarray, j);
404 json_object_object_add(ret, "areas", jarray);
405 HMI_DEBUG("area_list: %s", json_object_get_string(ret));
409 void WindowManager::api_change_area_size(ChangeAreaReq &areas)
413 auto client = g_app_list.lookUpClient(areas.appname);
415 if(client == nullptr)
417 HMI_ERROR("Call register your role with setRole or requestSurface");
420 if(std::find(white_list_area_size_change.begin(),
421 white_list_area_size_change.end(), client->role()) == white_list_area_size_change.end())
423 HMI_ERROR("Application %s which has the role %s is not allowed to change area size", client->appID().c_str(), client->role().c_str());
428 ret = this->lc->updateAreaList(areas);
429 if(ret != WMError::SUCCESS)
431 HMI_ERROR("%d : %s", ret, errorDescription(ret));
434 ret = this->lc->getUpdateAreaList(&areas);
436 if(ret != WMError::SUCCESS)
438 HMI_ERROR("%d : %s", ret, errorDescription(ret));
445 ret = this->setRequest(client->appID(), client->role(), "-", Task::TASK_CHANGE_AREA, &req_num); // area is null
446 if(ret != WMError::SUCCESS)
448 HMI_SEQ_ERROR(req_num, "%d : %s", ret, errorDescription(ret));
451 for(const auto &update: areas.update_app2area)
454 auto client = g_app_list.lookUpClient(update.first);
455 if(client == nullptr)
457 HMI_SEQ_ERROR(req_num, "%s : %s", update.first.c_str(), errorDescription(ret));
458 g_app_list.removeRequest(req_num);
459 this->processNextRequest();
462 ret = g_app_list.setAction(req_num, client, client->role(), update.second, TaskVisible::VISIBLE);
463 if(ret != WMError::SUCCESS)
465 HMI_SEQ_ERROR(req_num, "Failed to set request");
469 HMI_SEQ_INFO(req_num, "Area change request");
470 g_app_list.reqDump();
472 // Request change size to applications
473 for(const auto &action : g_app_list.getActions(req_num, &found))
475 struct rect r = this->lc->getAreaSize(action.area);
476 action.client->emitSyncDraw(action.area, r);
480 bool WindowManager::api_subscribe(afb_req_t req, EventType event_id)
483 char* appid = afb_req_get_application_id(req);
484 if(event_id < Event_Val_Min || event_id > Event_Val_Max)
486 HMI_ERROR("not defined in Window Manager", event_id);
489 HMI_INFO("%s subscribe %s : %d", appid, kListEventName[event_id], event_id);
490 if(event_id == Event_ScreenUpdated)
492 // Event_ScreenUpdated should be emitted to subscriber
493 afb_event_t event = this->map_afb_event[kListEventName[event_id]];
494 int rc = afb_req_subscribe(req, event);
504 auto client = g_app_list.lookUpClient(id);
505 if(client != nullptr)
507 ret = client->subscribe(req, kListEventName[event_id]);
513 result<json_object *> WindowManager::api_get_display_info()
515 Screen screen = this->lc->getScreenInfo();
517 json_object *object = json_object_new_object();
518 json_object_object_add(object, kKeyWidthPixel, json_object_new_int(screen.width()));
519 json_object_object_add(object, kKeyHeightPixel, json_object_new_int(screen.height()));
521 json_object_object_add(object, kKeyWidthMm, json_object_new_int(0));
522 json_object_object_add(object, kKeyHeightMm, json_object_new_int(0));
523 json_object_object_add(object, kKeyScale, json_object_new_double(this->lc->scale()));
525 return Ok<json_object *>(object);
528 result<json_object *> WindowManager::api_get_area_info(char const *drawing_name)
532 string role = drawing_name;
534 // Check drawing name, surface/layer id
535 auto const &surface_id = this->id_alloc.lookup(role);
538 return Err<json_object *>("Surface does not exist");
541 // Set area rectangle
542 struct rect area_info = this->area_info[*surface_id];
543 json_object *object = json_object_new_object();
544 json_object_object_add(object, kKeyX, json_object_new_int(area_info.x));
545 json_object_object_add(object, kKeyY, json_object_new_int(area_info.y));
546 json_object_object_add(object, kKeyWidth, json_object_new_int(area_info.w));
547 json_object_object_add(object, kKeyHeight, json_object_new_int(area_info.h));
549 return Ok<json_object *>(object);
555 void WindowManager::surface_created(unsigned surface_id)
558 if(this->tmp_surface2app.count(surface_id) != 0)
560 string appid = this->tmp_surface2app[surface_id].appid;
561 auto client = g_app_list.lookUpClient(appid);
562 if(client != nullptr)
564 WMError ret = client->addSurface(surface_id);
565 HMI_INFO("Add surface %d to \"%s\"", surface_id, appid.c_str());
566 if(ret != WMError::SUCCESS)
568 HMI_ERROR("Failed to add surface to client %s", client->appID().c_str());
571 this->tmp_surface2app.erase(surface_id);
575 void WindowManager::surface_removed(unsigned surface_id)
577 HMI_DEBUG("Delete surface_id %u", surface_id);
578 this->id_alloc.remove_id(surface_id);
579 g_app_list.removeSurface(surface_id);
582 void WindowManager::removeClient(const string &appid)
584 HMI_DEBUG("Remove clinet %s from list", appid.c_str());
585 auto client = g_app_list.lookUpClient(appid);
586 this->lc->appTerminated(client);
587 g_app_list.removeClient(appid);
590 void WindowManager::exceptionProcessForTransition()
592 unsigned req_num = g_app_list.currentRequestNumber();
593 HMI_SEQ_NOTICE(req_num, "Process exception handling for request. Remove current request %d", req_num);
594 g_app_list.removeRequest(req_num);
595 HMI_SEQ_NOTICE(g_app_list.currentRequestNumber(), "Process next request if exists");
596 this->processNextRequest();
599 void WindowManager::timerHandler()
601 unsigned req_num = g_app_list.currentRequestNumber();
602 HMI_SEQ_DEBUG(req_num, "Timer expired remove Request");
603 g_app_list.reqDump();
604 g_app_list.removeRequest(req_num);
605 this->processNextRequest();
608 void WindowManager::startTransitionWrapper(vector<WMAction> &actions)
611 unsigned req_num = g_app_list.currentRequestNumber();
615 if (g_app_list.haveRequest())
617 HMI_SEQ_DEBUG(req_num, "There is no WMAction for this request");
618 goto proc_remove_request;
622 HMI_SEQ_DEBUG(req_num, "There is no request");
627 for (auto &act : actions)
632 auto const &surface_id = this->id_alloc.lookup(act.role);
633 if(surface_id == nullopt)
635 goto proc_remove_request;
637 string appid = g_app_list.getAppID(*surface_id, &found);
640 if (TaskVisible::INVISIBLE == act.visible)
642 // App is killed, so do not set this action
647 HMI_SEQ_ERROR(req_num, "appid which is visible is not found");
652 auto client = g_app_list.lookUpClient(appid);
653 act.req_num = req_num;
657 ret = g_app_list.setAction(req_num, act);
658 if (ret != WMError::SUCCESS)
660 HMI_SEQ_ERROR(req_num, "Setting action is failed");
665 HMI_SEQ_DEBUG(req_num, "Start transition.");
666 ret = this->startTransition(req_num);
667 if (ret != WMError::SUCCESS)
669 if (ret == WMError::NO_LAYOUT_CHANGE)
671 goto proc_remove_request;
675 HMI_SEQ_ERROR(req_num, "Transition state is failed");
684 HMI_SEQ_ERROR(req_num, errorDescription(ret));
685 this->pmw.undoState();
688 g_app_list.removeRequest(req_num);
689 this->processNextRequest();
692 void WindowManager::processError(WMError error)
694 unsigned req_num = g_app_list.currentRequestNumber();
697 HMI_SEQ_ERROR(req_num, errorDescription(error));
698 g_app_list.removeRequest(req_num);
699 this->processNextRequest();
702 WMError WindowManager::setRequest(const string& appid, const string &role, const string &area,
703 Task task, unsigned* req_num)
705 if (!g_app_list.contains(appid))
707 return WMError::NOT_REGISTERED;
710 auto client = g_app_list.lookUpClient(appid);
715 unsigned current = g_app_list.currentRequestNumber();
716 unsigned requested_num = g_app_list.getRequestNumber(appid);
717 if (requested_num != 0)
719 HMI_SEQ_INFO(requested_num,
720 "%s %s %s request is already queued", appid.c_str(), role.c_str(), area.c_str());
724 WMRequest req = WMRequest(appid, role, area, task);
725 unsigned new_req = g_app_list.addRequest(req);
727 g_app_list.reqDump();
729 HMI_SEQ_DEBUG(current, "%s start sequence with %s, %s", appid.c_str(), role.c_str(), area.c_str());
731 return WMError::SUCCESS;
734 WMError WindowManager::checkPolicy(unsigned req_num)
739 // get current trigger
741 WMError ret = WMError::LAYOUT_CHANGE_FAIL;
742 auto trigger = g_app_list.getRequest(req_num, &found);
745 ret = WMError::NO_ENTRY;
748 string req_area = trigger.area;
750 // Input event data to PolicyManager
751 if (0 > this->pmw.setInputEventData(trigger.task, trigger.role, trigger.area))
753 HMI_SEQ_ERROR(req_num, "Failed to set input event data to PolicyManager");
757 // Execute state transition of PolicyManager
758 if (0 > this->pmw.executeStateTransition())
760 HMI_SEQ_ERROR(req_num, "Failed to execute state transition of PolicyManager");
764 ret = WMError::SUCCESS;
766 g_app_list.reqDump();
771 WMError WindowManager::startTransition(unsigned req_num)
773 bool sync_draw_happen = false;
775 WMError ret = WMError::SUCCESS;
776 auto actions = g_app_list.getActions(req_num, &found);
779 ret = WMError::NO_ENTRY;
780 HMI_SEQ_ERROR(req_num,
781 "Window Manager bug :%s : Action is not set", errorDescription(ret));
785 g_app_list.reqDump();
786 for (const auto &action : actions)
788 if (action.visible == TaskVisible::VISIBLE)
790 sync_draw_happen = true;
791 struct rect r = this->lc->getAreaSize(action.area);
792 action.client->emitSyncDraw(action.area, r);
796 if (sync_draw_happen)
802 // deactivate only, no syncDraw
803 // Make it deactivate here
804 for (const auto &x : actions)
806 this->lc->visibilityChange(x);
807 x.client->emitActive(false);
808 x.client->emitVisible(false);
810 this->lc->renderLayers();
811 ret = WMError::NO_LAYOUT_CHANGE;
816 WMError WindowManager::doEndDraw(unsigned req_num)
820 auto actions = g_app_list.getActions(req_num, &found);
821 WMError ret = WMError::SUCCESS;
824 ret = WMError::NO_ENTRY;
828 HMI_SEQ_INFO(req_num, "do endDraw");
830 // layout change and make it visible
831 for (const auto &act : actions)
833 if(act.visible != TaskVisible::NO_CHANGE)
836 ret = this->lc->layoutChange(act);
837 if(ret != WMError::SUCCESS)
839 HMI_SEQ_WARNING(req_num,
840 "Failed to manipulate surfaces while state change : %s", errorDescription(ret));
843 ret = this->lc->visibilityChange(act);
845 act.client->emitActive((act.visible == VISIBLE));
846 act.client->emitVisible((act.visible == VISIBLE));
848 if (ret != WMError::SUCCESS)
850 HMI_SEQ_WARNING(req_num,
851 "Failed to manipulate surfaces while state change : %s", errorDescription(ret));
854 HMI_SEQ_DEBUG(req_num, "visible %s", act.role.c_str());
857 this->lc->renderLayers();
859 HMI_SEQ_INFO(req_num, "emit flushDraw");
861 for(const auto &act_flush : actions)
863 if(act_flush.visible == TaskVisible::VISIBLE)
865 act_flush.client->emitFlushDraw();
872 void WindowManager::emitScreenUpdated(unsigned req_num)
875 HMI_SEQ_DEBUG(req_num, "emit screen updated");
877 auto actions = g_app_list.getActions(req_num, &found);
880 HMI_SEQ_ERROR(req_num,
881 "Window Manager bug :%s : Action is not set",
882 errorDescription(WMError::NO_ENTRY));
886 // create json object
887 json_object *j = json_object_new_object();
888 json_object *jarray = json_object_new_array();
890 for(const auto& action: actions)
892 if(action.visible != TaskVisible::INVISIBLE)
894 json_object_array_add(jarray, json_object_new_string(action.client->appID().c_str()));
897 json_object_object_add(j, kKeyIds, jarray);
898 HMI_SEQ_INFO(req_num, "Visible app: %s", json_object_get_string(j));
900 int ret = afb_event_push(
901 this->map_afb_event[kListEventName[Event_ScreenUpdated]], j);
904 HMI_DEBUG("afb_event_push failed: %m");
908 void WindowManager::setTimer()
911 if (clock_gettime(CLOCK_BOOTTIME, &ts) != 0) {
912 HMI_ERROR("Could't set time (clock_gettime() returns with error");
916 HMI_SEQ_DEBUG(g_app_list.currentRequestNumber(), "Timer set activate");
917 if (g_timer_ev_src == nullptr)
919 // firsttime set into sd_event
920 int ret = sd_event_add_time(afb_api_get_event_loop(afbBindingV3root), &g_timer_ev_src,
921 CLOCK_BOOTTIME, (uint64_t)(ts.tv_sec + kTimeOut) * 1000000ULL, 1, processTimerHandler, this);
924 HMI_ERROR("Could't set timer");
929 // update timer limitation after second time
930 sd_event_source_set_time(g_timer_ev_src, (uint64_t)(ts.tv_sec + kTimeOut) * 1000000ULL);
931 sd_event_source_set_enabled(g_timer_ev_src, SD_EVENT_ONESHOT);
935 void WindowManager::stopTimer()
937 unsigned req_num = g_app_list.currentRequestNumber();
938 HMI_SEQ_DEBUG(req_num, "Timer stop");
939 int rc = sd_event_source_set_enabled(g_timer_ev_src, SD_EVENT_OFF);
942 HMI_SEQ_ERROR(req_num, "Timer stop failed");
946 void WindowManager::processNextRequest()
949 g_app_list.reqDump();
950 unsigned req_num = g_app_list.currentRequestNumber();
951 if (g_app_list.haveRequest())
953 HMI_SEQ_DEBUG(req_num, "Process next request");
954 WMError rc = checkPolicy(req_num);
955 if (rc != WMError::SUCCESS)
957 HMI_SEQ_ERROR(req_num, errorDescription(rc));
962 HMI_SEQ_DEBUG(req_num, "Nothing Request. Waiting Request");