diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 442c8f37..5a4c9301 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -9,8 +9,8 @@ android { applicationId = "tv.orbit.classic" minSdk = 26 targetSdk = 36 - versionCode = 281 - versionName = "0.110.5-arcade-stage-c" + versionCode = 290 + versionName = "0.110.7-arcade1" } buildFeatures { compose = true } // The finished build for the TVs (Paul, 6 November 2026: the test build stuttered on the box). Not debuggable, so diff --git a/android/app/src/main/java/tv/orbit/classic/InstallSnapshot.kt b/android/app/src/main/java/tv/orbit/classic/InstallSnapshot.kt index 17b0f546..7c0ef7b7 100644 --- a/android/app/src/main/java/tv/orbit/classic/InstallSnapshot.kt +++ b/android/app/src/main/java/tv/orbit/classic/InstallSnapshot.kt @@ -44,7 +44,8 @@ class InstallSnapshotReceiver : BroadcastReceiver() { internal object InstallSnapshot { /** Orbit's screen is open in this process (set by MainActivity); a restore waits until it isn't. */ @Volatile var screenOpen = false - private val versionShape = Regex("""\d+\.\d+\.\d+""") + // A plain version, or one with a short suffix (0.110.7-arcade1), so a trial build's name doesn't refuse the rollback copy. + private val versionShape = Regex("""\d+\.\d+\.\d+(-[a-z0-9]+(-[a-z0-9]+)*)?""") fun handle(context: Context, action: String, version: String?): String { val data = context.filesDir.parentFile ?: return "no data" @@ -57,6 +58,10 @@ internal object InstallSnapshot { File(data, "shared_prefs/orbit_settings.xml").takeIf { it.exists() }?.copyTo(File(out, "shared_prefs/orbit_settings.xml"), overwrite = true) // Profiles too (7 November 2026), so an install can be shown to keep everyone; names and channels only, no PIN. File(data, "shared_prefs/orbit_profiles.xml").takeIf { it.exists() }?.copyTo(File(out, "shared_prefs/orbit_profiles.xml"), overwrite = true) + // The Arcade's saves and (BumbleHive native, 8 November 2026) the WebView's localStorage folder, copied only, + // so an install can show the old BumbleHive save and every profile's scores came through untouched. + File(data, "files/arcade").takeIf { it.isDirectory }?.copyRecursively(File(out, "files/arcade"), overwrite = true) + File(data, "app_webview/Default/Local Storage").takeIf { it.isDirectory }?.copyRecursively(File(out, "app_webview/Default/Local Storage"), overwrite = true) File(out, "hashes.txt").writeText(listOf("no_backup/catalogue.db", "no_backup/orbit-connection.v1") .joinToString("\n") { "${sha256(File(data, it))} $it" } + "\n") "copied ${schedule.walk().count { it.isFile }}"