Skip to content

Commit

Permalink
Use appman's preload instead of auto launching the apps itself
Browse files Browse the repository at this point in the history
Previously we maintained an own list of applications which should be
auto started and minimized.
Now we use appman's preload property in info.yaml to identify the
apps which are autostarted and should be started minimized

Change-Id: If0be0732de25da73ac6fce02dee2ffbd843bac47
Reviewed-by: Nedim Hadzic <[email protected]>
  • Loading branch information
Gagi2k committed Oct 5, 2016
1 parent c9d5103 commit f29be50
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions imports/system/models/ApplicationManagerInterface.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,32 @@ QtObject {
property string activeAppId

property variant blackListItems: []
property var minimizedItems: [NavigationService.defaultNavApp] // Apps which will be started but not shown in full screen
property var minimizedItems: [] // Apps which will be started but not shown in full screen
property Item windowItem
property Item mapWidget
property var itemsToRelease: []

property Timer timer: Timer {
interval: 1000
onTriggered: {
for (var i in root.minimizedItems) {
ApplicationManager.startApplication(root.minimizedItems[i])
}
}
}

signal applicationSurfaceReady(Item item, bool isMinimized)
signal releaseApplicationSurface()

// Cluster signals
signal clusterWidgetReady(string category, Item item)

Component.onCompleted: {
// Maintain a set of applications which are autostarted(preloaded)
// This is needed to know that these applications should be minimized
for (var i = 0; i < ApplicationManager.count; ++i) {
var app = ApplicationManager.get(i);
if (app.application.preload) {
minimizedItems.push(app.applicationId)
}
}

WindowManager.windowReady.connect(windowReadyHandler)
WindowManager.windowClosing.connect(windowClosingHandler)
ApplicationManager.applicationWasActivated.connect(applicationActivated)
WindowManager.windowLost.connect(windowLostHandler)
WindowManager.windowPropertyChanged.connect(windowPropertyChanged)
timer.start()
}

function windowReadyHandler(index, item) {
Expand Down

0 comments on commit f29be50

Please sign in to comment.