aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-15 17:11:44 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-15 17:11:44 +0900
commitd3fd818d0f2cb5a40f900166aad9a7f21bebc5b3 (patch)
treeb41915e821962e13101a0ca6a1b0cb31e3520efe /src
parenteb892f6103c8bb2d95e6fd5274d2bac7d7f0b6fb (diff)
Compile success
Change-Id: I950ec6359e95c76eaed6894d489c58ad0d2cde25 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r--src/app.cpp55
-rw-r--r--src/app.hpp22
2 files changed, 15 insertions, 62 deletions
diff --git a/src/app.cpp b/src/app.cpp
index c30223c..7a0804d 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -577,7 +577,7 @@ WMError App::checkPolicy(unsigned req_num)
* Check Policy
*/
// get current trigger
- bool found;
+ bool found, split;
WMError ret = WMError::LAYOUT_CHANGE_FAIL;
auto trigger = g_app_list.getRequest(req_num, &found);
if (!found)
@@ -605,9 +605,9 @@ WMError App::checkPolicy(unsigned req_num)
struct LayoutState &state = *o_state;
unsigned curernt_sid = state.main;
- bool can_split = this->can_split(state, *surface_id);
+ bool split = this->can_split(state, *surface_id);
- if (can_split)
+ if (split)
{
// Get current visible role
std::string add_role = this->lookup_name(state.main).value();
@@ -635,38 +635,9 @@ WMError App::checkPolicy(unsigned req_num)
g_app_list.reqDump();
}
}
- // >>>> This will be removed
-
- /* get new status from Policy Manager */
- if (can_split)
- {
- // Get current visible role
- std::string add_role = this->lookup_name(state.main).value();
- // Set next area
- std::string add_area = std::string(kNameLayoutSplit) + "." + std::string(kNameAreaMain);
- // Change request area
- req_area = std::string(kNameLayoutSplit) + "." + std::string(kNameAreaSub);
- // set another action
- std::string add_name = "navigation";
-
- HMI_SEQ_INFO(req_num, "Additional split app %s, role: %s, area: %s", add_name.c_str(), add_role.c_str(), add_area.c_str());
- // Set split action
- bool visible = true;
- bool end_draw_finished = false;
- WMAction new_act{add_name, add_role, add_area, visible, end_draw_finished};
- WMError ret = g_app_list.setAction(req_num, new_act);
- if (ret != WMError::SUCCESS)
- {
- HMI_SEQ_ERROR(req_num, "Failed to set action");
- return ret;
- }
- g_app_list.reqDump();
- }
- }
- // >>>> This will be removed
// Set invisible task
- this->setInvisibleTask(trigger.role, can_split);
+ this->setInvisibleTask(trigger.role, split);
/* get new status from Policy Manager */
HMI_SEQ_NOTICE(req_num, "ATM, Policy manager does't exist, then set WMAction as is");
@@ -723,6 +694,11 @@ WMError App::startTransition(unsigned req_num)
return ret;
}
+void App::setInvisibleTask(const std::string &role, bool split)
+{
+ ;
+}
+
void App::lm_layout_change(const char *drawing_name)
{
auto const &surface_id = this->lookup_id(drawing_name);
@@ -1138,17 +1114,6 @@ WMError App::doEndDraw(unsigned req_num)
}
}
-void App::processRequest()
-{
- unsigned req = g_app_list.currentRequestNumber();
- HMI_SEQ_DEBUG(req, "Do next request");
- WMError rc = doTransition(req);
- if(rc != WMError::SUCCESS)
- {
- HMI_SEQ_ERROR(req, errorDescription(rc));
- }
-}
-
WMError App::setSurfaceSize(unsigned surface, const std::string &area)
{
// Actually this function is under Layout Manager
@@ -1178,7 +1143,7 @@ WMError App::setSurfaceSize(unsigned surface, const std::string &area)
WMError App::layoutChange(const WMAction &action)
{
- if(act.visible == false)
+ if (action.visible == false)
{
return WMError::SUCCESS;
}
diff --git a/src/app.hpp b/src/app.hpp
index 9ebdda5..235cd01 100644
--- a/src/app.hpp
+++ b/src/app.hpp
@@ -268,28 +268,18 @@ struct App
WMError doTransition(unsigned sequence_number);
WMError checkPolicy(unsigned req_num);
WMError startTransition(unsigned req_num);
+ void setInvisibleTask(const std::string &role, bool split);
- void setTimer();
- void stopTimer();
- void processRequest();
-
- WMError setRequest(const std::string &appid, const std::string &role, const std::string &area,
- Task task, unsigned *req_num);
- WMError doTransition(unsigned req_num);
- WMError checkPolicy(unsigned req_num);
- void setInvisibleTask(const std::string &role);
- WMError startTransition(unsigned req_num);
+ WMError doEndDraw(unsigned req_num);
WMError layoutChange(const WMAction &action);
WMError visibilityChange(const WMAction &action);
WMError setSurfaceSize(unsigned surface, const std::string& area);
- void processNextRequest();
- //void currentAppInvisible(const std::string &role);
-
void setTimer();
void stopTimer();
- void processRequest();
- WMError doEndDraw(unsigned req_num);
+ void processNextRequest();
+ //void currentAppInvisible(const std::string &role);
+
const char *check_surface_exist(const char *drawing_name);
void activate(int id);
@@ -307,8 +297,6 @@ struct App
WMError lm_layout_change(const struct WMAction &action);
WMError lm_release(const struct WMAction &action);
void lm_enddraw(const char *drawing_name);
- void lm_get_area_info(const std::string &area);
- void lm_get_area_info(const std::string &area);
private:
std::unordered_map<std::string, struct compositor::rect> area2size;