Compare commits

...

3 Commits

Author SHA1 Message Date
8b1a2eede3 fix(build): disable daemon and serialize workers to prevent OOM on CI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:28:38 +01:00
c752be3d07 fix(build): cap JVM heap and limit workers to prevent daemon OOM crash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:15:36 +01:00
0b756788c2 fix(updater): self-register SilverDROID in installed_apps before update check
The worker exited early when the DB was empty (fresh installs via browser).
Now upserts a self-record for slug='silverdroid' before the isEmpty guard
so update notifications fire even when no other apps have been installed
via the AppStore.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 22:43:29 +00:00
2 changed files with 18 additions and 1 deletions

View File

@@ -49,6 +49,21 @@ class UpdateCheckerWorker(
override suspend fun doWork(): Result = withContext(Dispatchers.IO) { override suspend fun doWork(): Result = withContext(Dispatchers.IO) {
try { try {
val dao = PwaDatabase.getInstance(context).installedAppDao() val dao = PwaDatabase.getInstance(context).installedAppDao()
// Ensure SilverDROID itself is always tracked so it can detect its own updates
val selfSlug = "silverdroid"
val selfVersion = try {
context.packageManager.getPackageInfo(context.packageName, 0).versionName ?: "1.0.0"
} catch (e: Exception) { "1.0.0" }
if (dao.getBySlug(selfSlug) == null) {
dao.insert(InstalledApp(
slug = selfSlug,
packageName = context.packageName,
appName = "SilverDROID",
installedVersion = selfVersion
))
}
val installedApps = dao.getAllAppsOnce() val installedApps = dao.getAllAppsOnce()
if (installedApps.isEmpty()) return@withContext Result.success() if (installedApps.isEmpty()) return@withContext Result.success()

View File

@@ -1,6 +1,8 @@
# Project-wide Gradle settings. # Project-wide Gradle settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -Dfile.encoding=UTF-8
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.workers.max=1
org.gradle.daemon=false
org.gradle.caching=true org.gradle.caching=true
org.gradle.configuration-cache=true org.gradle.configuration-cache=true