- HMI_DEBUG("HomeScreen","tapShortcut %s", application_id.toStdString().c_str());
-#if 0
- struct json_object* j_json = json_object_new_object();
- struct json_object* value;
-
- struct agl_shell *agl_shell = aglShell->shell.get();
- QPlatformNativeInterface *native = qApp->platformNativeInterface();
- struct wl_output *output = getWlOutput(native, qApp->screens().first());
-
- value = json_object_new_string("normal.full");
- json_object_object_add(j_json, "area", value);
-
- mp_hs->showWindow(application_id.toStdString().c_str(), j_json);
-
- // this works (and it is redundant the first time), due to the default
- // policy engine installed which actives the application, when starting
- // the first time. Later calls to HomescreenHandler::tapShortcut will
- // require calling 'agl_shell_activate_app'
- agl_shell_activate_app(agl_shell, application_id.toStdString().c_str(), output);
-
-#endif
-
- if (mp_launcher) {
- mp_launcher->setCurrent(application_id);
- }
- appStarted(application_id);
-}
-
-#if 0
-void HomescreenHandler::onRep_static(struct json_object* reply_contents)
-{
- static_cast<HomescreenHandler*>(HomescreenHandler::myThis)->onRep(reply_contents);
-}
-
-void HomescreenHandler::onEv_static(const string& event, struct json_object* event_contents)
-{
- static_cast<HomescreenHandler*>(HomescreenHandler::myThis)->onEv(event, event_contents);
-}
-
-void HomescreenHandler::onRep(struct json_object* reply_contents)
-{
- const char* str = json_object_to_json_string(reply_contents);
- HMI_DEBUG("HomeScreen","HomeScreen onReply %s", str);
-}
-
-void HomescreenHandler::onEv(const string& event, struct json_object* event_contents)
-{
- const char* str = json_object_to_json_string(event_contents);
- HMI_DEBUG("HomeScreen","HomeScreen onEv %s, contents: %s", event.c_str(), str);
-
- if (event.compare("homescreen/on_screen_message") == 0) {
- struct json_object *json_data = json_object_object_get(event_contents, "data");
- struct json_object *json_display_message = json_object_object_get(json_data, "display_message");
- const char* display_message = json_object_get_string(json_display_message);
-
- HMI_DEBUG("HomeScreen","display_message = %s", display_message);
+ HMI_DEBUG("HomeScreen","tapShortcut %s", application_id.toStdString().c_str());
+
+ QDBusPendingReply<> reply = applaunch_iface->start(application_id);
+ reply.waitForFinished();
+ if (reply.isError()) {
+ HMI_ERROR("HomeScreen","Unable to start application '%s': %s",
+ application_id.toStdString().c_str(),
+ reply.error().message().toStdString().c_str());
+ } else {
+ if (mp_launcher) {
+ mp_launcher->setCurrent(application_id);
+ }
+ appStarted(application_id);