fixup! SessionInstaller: Rework installation queue logic
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -73,7 +73,7 @@ class SessionInstaller @Inject constructor(
|
|||||||
// If this was a shared lib, proceed installing other libs or actual package
|
// If this was a shared lib, proceed installing other libs or actual package
|
||||||
if (sessionMap.isNotEmpty() && success) {
|
if (sessionMap.isNotEmpty() && success) {
|
||||||
val nextSession = sessionMap.keys.first()
|
val nextSession = sessionMap.keys.first()
|
||||||
commitInstall(sessionMap.getValue(nextSession), nextSession)
|
commitInstall(sessionMap.getValue(nextSession), nextSession); return
|
||||||
} else {
|
} else {
|
||||||
enqueuedSessions.remove(sessionMap)
|
enqueuedSessions.remove(sessionMap)
|
||||||
}
|
}
|
||||||
@@ -131,15 +131,12 @@ class SessionInstaller @Inject constructor(
|
|||||||
sessionIdMap[sessionID] = download.packageName
|
sessionIdMap[sessionID] = download.packageName
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enqueuedSessions.isEmpty()) {
|
// Enqueue and trigger installation
|
||||||
enqueuedSessions.add(sessionIdMap)
|
enqueuedSessions.add(sessionIdMap)
|
||||||
commitInstall(
|
commitInstall(
|
||||||
sessionIdMap.getValue(sessionIdMap.keys.first()),
|
sessionIdMap.getValue(sessionIdMap.keys.first()),
|
||||||
sessionIdMap.keys.first()
|
sessionIdMap.keys.first()
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
enqueuedSessions.add(sessionIdMap)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user