fix: the client install stays awake until Steam's first frame and its end is recorded

This commit is contained in:
maxjivi05 committed 2026-10-23 22:22:14 -04:00
1 parent 96e2bf992d
commit 7419ba114f
1 file changed
+3 -1
@@ -1872,6 +1872,7 @@ class SessionService : Service() {
downloadMonitorTask = null
steamDownloadMonitor.reset()
downloadActive = false
if (clientInstallActive) SessionEvents.record("steam.client_download", mapOf("active" to false))
clientInstallActive = false
if (wasActive) refreshNotification()
return
@@ -1889,7 +1890,8 @@ class SessionService : Service() {
val root = LinuxRuntime.rootDir(this@SessionService)
val wasActive = downloadActive
val wasInstalling = clientInstallActive
clientInstallActive = !SessionState.firstFrameSeen && SteamDownloadMonitor.clientInstallPending(root)
clientInstallActive = !SessionState.firstFrameSeen &&
(clientInstallActive || SteamDownloadMonitor.clientInstallPending(root))
downloadActive = clientInstallActive || steamDownloadsInBackground && steamDownloadMonitor.poll(
root,
receivedBytes = TrafficStats.getUidRxBytes(android.os.Process.myUid()),