diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-08-06 12:00:28 +0900 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2018-08-16 13:45:13 -0400 |
commit | 58d5aa69c638b5e6d59f858516385e01fe248031 (patch) | |
tree | 3f4861d711cd4f0ef0a1406912dc7fbbf374cc6d /sample/simple-egl | |
parent | ba66f5506b4abdaf61ff5caa51dadc3d397fe5a0 (diff) |
Use appid between homescreen-service and appsflounder_5.99.3flounder/5.99.35.99.3
Use appid between hss and apps, and check event destination in libhomescreen.
So these is no need compare code when recived Event_TapShortcut Event.
[Patch Sets 2]
Make a copy of the string returned by getenv.
BUG-AGL: SPEC-1645
Change-Id: I042015ee92c4c142418b1ac15d51a9408e219757
Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'sample/simple-egl')
-rw-r--r-- | sample/simple-egl/src/simple-egl.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sample/simple-egl/src/simple-egl.cpp b/sample/simple-egl/src/simple-egl.cpp index be694d7..f56cf4d 100644 --- a/sample/simple-egl/src/simple-egl.cpp +++ b/sample/simple-egl/src/simple-egl.cpp @@ -579,17 +579,11 @@ init_hs(LibHomeScreen* hs){ } hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [](json_object *object){ - const char *application_name = json_object_get_string( - json_object_object_get(object, "application_name")); - HMI_DEBUG("simple-egl","Event_TapShortcut application_name = %s ", application_name); - if(strcmp(application_name, app_name.c_str()) == 0) - { - HMI_DEBUG("simple-egl","try to activesurface %s ", app_name.c_str()); - json_object *obj = json_object_new_object(); - json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str())); - json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string("normal.full")); - wm->activateSurface(obj); - } + HMI_DEBUG("simple-egl","try to activesurface %s ", app_name.c_str()); + json_object *obj = json_object_new_object(); + json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str())); + json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string("normal.full")); + wm->activateSurface(obj); }); return 0; |