diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-08-08 14:42:53 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-08-08 14:42:53 +0900 |
commit | 389a02a99961f1bcc6d317ffc9223ea7f2d05023 (patch) | |
tree | 6f50e84d3cad144b7aac031b27cf65d9e5ec1661 | |
parent | 58ecf2c3229ab677ca39095b52ab88b1a41861bd (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.
BUG-AGL: SPEC-1645
Change-Id: Idd052d3f76f83e1f5bfe46627d7698655ffad85d
Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
-rw-r--r-- | homescreen/qml/ShortcutArea.qml | 6 | ||||
-rw-r--r-- | homescreen/src/homescreenhandler.cpp | 6 | ||||
-rw-r--r-- | homescreen/src/homescreenhandler.h | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/homescreen/qml/ShortcutArea.qml b/homescreen/qml/ShortcutArea.qml index e0c9182..d7e97f0 100644 --- a/homescreen/qml/ShortcutArea.qml +++ b/homescreen/qml/ShortcutArea.qml @@ -28,18 +28,22 @@ Item { ListModel { id: applicationModel ListElement { + appid: 'launcher' name: 'launcher' application: 'launcher@0.1' } ListElement { + appid: 'mediaplayer' name: 'MediaPlayer' application: 'mediaplayer@0.1' } ListElement { + appid: 'hvac' name: 'HVAC' application: 'hvac@0.1' } ListElement { + appid: 'navigation' name: 'Navigation' application: 'navigation@0.1' } @@ -66,7 +70,7 @@ Item { console.warn(model.application) console.warn("app cannot be launched!") } - homescreenHandler.tapShortcut(model.name) + homescreenHandler.tapShortcut(model.appid) } } } diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp index 5da8b9e..daf1b90 100644 --- a/homescreen/src/homescreenhandler.cpp +++ b/homescreen/src/homescreenhandler.cpp @@ -51,10 +51,10 @@ void HomescreenHandler::init(int port, const char *token) } -void HomescreenHandler::tapShortcut(QString application_name) +void HomescreenHandler::tapShortcut(QString application_id) { - HMI_DEBUG("HomeScreen","tapShortcut %s", application_name.toStdString().c_str()); - mp_hs->tapShortcut(application_name.toStdString().c_str()); + HMI_DEBUG("HomeScreen","tapShortcut %s", application_id.toStdString().c_str()); + mp_hs->tapShortcut(application_id.toStdString().c_str()); } void HomescreenHandler::onRep_static(struct json_object* reply_contents) diff --git a/homescreen/src/homescreenhandler.h b/homescreen/src/homescreenhandler.h index c18d7a0..1a9a2b5 100644 --- a/homescreen/src/homescreenhandler.h +++ b/homescreen/src/homescreenhandler.h @@ -32,7 +32,7 @@ public: void init(int port, const char* token); - Q_INVOKABLE void tapShortcut(QString application_name); + Q_INVOKABLE void tapShortcut(QString application_id); void onRep(struct json_object* reply_contents); void onEv(const string& event, struct json_object* event_contents); |