start app by homescreen-service
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Wed, 23 Jan 2019 11:49:23 +0000 (19:49 +0800)
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Wed, 23 Jan 2019 12:00:33 +0000 (20:00 +0800)
Change-Id: I88b73825fb6c63a131235a3eb3cc54877da3cdb4

launcher/qml/Launcher.qml
launcher/src/applicationmodel.cpp

index ad15fe9..46e7219 100644 (file)
@@ -88,13 +88,7 @@ ApplicationWindow {
                     return
                 }
                 if (currentId === '') {
-                    pid = launcher.launch(applicationModel.id(loc.index))
-                    if (1 < pid) {
-                        homescreenHandler.tapShortcut(applicationModel.appid(loc.index))
-                    }
-                    else {
-                        console.warn("app cannot be launched!")
-                    }
+                    homescreenHandler.tapShortcut(applicationModel.appid(loc.index))
                 } else {
                     currentId = ''
                 }
index c18291c..a148505 100644 (file)
@@ -55,23 +55,6 @@ namespace {
 
 ApplicationModel::Private::Private()
 {
-//    QString apps = afm_user_daemon_proxy->runnables(QStringLiteral(""));
-//    QJsonDocument japps = QJsonDocument::fromJson(apps.toUtf8());
-//    for (auto const &app : japps.array()) {
-//        QJsonObject const &jso = app.toObject();
-//        auto const name = jso["name"].toString();
-//        auto const id = jso["id"].toString();
-//        auto const icon = get_icon_name(jso);
-
-//        if ( name != "launcher" &&
-//             name != "homescreen-2017" &&
-//             name != "homescreen" &&
-//             name != "OnScreenApp") {
-//            this->data.append(AppInfo(icon, name, id));
-//        }
-
-//        HMI_DEBUG("launcher","name: %s icon: %s id: %s.", name.toStdString().c_str(), icon.toStdString().c_str(), id.toStdString().c_str());
-//    }
 }
 
 void ApplicationModel::Private::addApp(QString icon, QString name, QString id)