use value in takewhile for pollInstallStatus in installer

This commit is contained in:
Jays2Kings 2021-07-18 00:57:02 -04:00
parent 5da21660a3
commit 89f0ecaeaa

View File

@ -189,10 +189,10 @@ internal class ExtensionInstaller(private val context: Context) {
delay(500) delay(500)
} }
} }
.takeWhile { .takeWhile { info ->
val sessionId = downloadInstallerMap[id] val sessionId = downloadInstallerMap[id]
if (sessionId != null) { if (sessionId != null) {
context.packageManager.packageInstaller.getSessionInfo(sessionId) != null info.second != null
} else { } else {
true true
} }