diff --git a/android/app/src/main/java/tv/orbit/classic/RememberedConnectionStore.kt b/android/app/src/main/java/tv/orbit/classic/RememberedConnectionStore.kt index 4a65956b..54cd9e06 100644 --- a/android/app/src/main/java/tv/orbit/classic/RememberedConnectionStore.kt +++ b/android/app/src/main/java/tv/orbit/classic/RememberedConnectionStore.kt @@ -40,8 +40,10 @@ internal class RememberedConnectionStore(path: File, private val alias: String, } @Synchronized fun invalidate() { generation++; lastRead = null } private val file = AtomicFile(path) - private var generation = 0L - @Synchronized fun ticket() = generation + // Read without the lock: the screen asks for a ticket as it first draws, and must not wait while the sign-in is opened in + // the background (that wait held Orbit's first frame back by four seconds on the box, 6 November 2026). + @Volatile private var generation = 0L + fun ticket() = generation private fun key(create: Boolean): SecretKey { val store = KeyStore.getInstance("AndroidKeyStore").apply { load(null) } (store.getKey(alias, null) as? SecretKey)?.let { return it }