X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapp.cpp;h=07aab0b08d0f8b4fca4bb439869499c2f6a1cad5;hb=f73c5f5ff5cd4b424eed1a757c7bc8d3e34ec0e9;hp=b9338a9aaed4b113fa503f202207d17dd5c68e3f;hpb=0dcb9ae1f99cffcafac62a324f8f054cc212a880;p=apps%2Fagl-service-windowmanager.git diff --git a/src/app.cpp b/src/app.cpp index b9338a9..07aab0b 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -287,18 +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("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); } @@ -852,6 +860,8 @@ void App::deactivate(int id) { } // <<< FOR CES DEMO + this->layout_commit(); + this->emit_deactivated(label); this->emit_invisible(label); } @@ -909,7 +919,7 @@ int App::allocateSurface() { itr_layers != crr_layers.end(); ++itr_layers) { // Get layer std::string layer = itr_layers->first; - HMI_DEBUG("wm", "Update resource in %s layer", layer.c_str()); + HMI_DEBUG("wm", "Try to update resource in %s layer", layer.c_str()); // If layout is changed, update resouce if (this->lm_.isLayoutChanged(layer.c_str())) { @@ -953,7 +963,7 @@ int App::allocateSurface() { // Get category name std::string crr_ctg = crr_rol_ctg.begin()->second; - // Serch relevant role fron previous displayed role list + // Serch relevant role from previous displayed role list for (auto itr_role = prv_role_list.begin(); itr_role != prv_role_list.end(); ++itr_role) { std::string prv_ctg = this->pm_.roleToCategory((*itr_role).c_str()); @@ -1066,9 +1076,9 @@ int App::loadAppDb() { } // Load app.db - HMI_DEBUG("wm", "file_name:%s", file_name.c_str()); - json_object* json_obj = json_object_from_file(file_name.c_str()); - if (nullptr == json_obj) { + json_object* json_obj; + int ret = jh::inputJsonFilie(file_name.c_str(), &json_obj); + if (0 > ret) { HMI_ERROR("wm", "Could not open app.db, so use default role information"); json_obj = json_tokener_parse(kDefaultAppDb); }