aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-03-09 13:45:36 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-03-09 14:49:24 +0900
commitc146ba77b6546ac6703b41072a7f0b1a72803d63 (patch)
treeff414a7dc4fdb62b83d025582357e1ce1528362a /src
parente890bc6f1880c8b8a439692ea85c2f3992b99c15 (diff)
Enable fallback, then display applicationsflounder_5.99.1flounder/5.99.15.99.1
This patch enables the app to show if it is not registered in layers.json. The original installed app was not shown because the role of app is not registered in WM as default. [Patch set2] Add the same process into requestSurface for RunXDG Bug-AGL : SPEC-1331 Change-Id: Ie99b971023a95a1924795b1ffc7311a630940b1d Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r--src/app.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/app.cpp b/src/app.cpp
index b966172..846684b 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -701,8 +701,14 @@ void App::emit_visible(char const *label) { return emit_visible(label, true); }
result<int> App::api_request_surface(char const *drawing_name) {
auto lid = this->layers.get_layer_id(std::string(drawing_name));
if (!lid) {
- // TODO: Do we need to put these applications on the App layer?
- return Err<int>("Drawing name does not match any role");
+ /**
+ * register drawing_name as fallback and make it displayed.
+ */
+ lid = this->layers.get_layer_id(std::string("Fallback"));
+ HMI_DEBUG("wm", "%s is not registered in layers.json, then fallback as normal app", drawing_name);
+ if(!lid){
+ return Err<int>("Drawing name does not match any role, Fallback is disabled");
+ }
}
auto rname = this->lookup_id(drawing_name);
@@ -733,7 +739,14 @@ char const *App::api_request_surface(char const *drawing_name,
unsigned sid = std::stol(ivi_id);
if (!lid) {
- return "Drawing name does not match any role";
+ /**
+ * register drawing_name as fallback and make it displayed.
+ */
+ lid = this->layers.get_layer_id(std::string("Fallback"));
+ HMI_DEBUG("wm", "%s is not registered in layers.json, then fallback as normal app", drawing_name);
+ if(!lid){
+ return "Drawing name does not match any role, Fallback is disabled";
+ }
}
auto rname = this->lookup_id(drawing_name);