mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 08:56:59 +01:00
- RemoteArtwork takes the edge it is drawn at; library tiles decode their posters at that size rather than at 1024 pixels, sampled down and then scaled so a poster never lands under its tile. The decoded cache's ceiling rises from 32 to 64 MiB, so a grid scrolled back over is still decoded. - The title page decodes its download records on the IO dispatcher. WorkManager reports progress several times a second while a season downloads, and each report re-read every record on the main thread. - The settings file is loaded on a background thread at startup, so the playback service's start callback no longer reads it from disk on the main thread (B41).
17 lines
624 B
Kotlin
17 lines
624 B
Kotlin
package io.narl.protonstream
|
|
|
|
import android.app.Application
|
|
import io.narl.protonstream.native.NativeRuntime
|
|
import io.narl.protonstream.settings.SettingsStore
|
|
|
|
class ProtonStreamApplication : Application() {
|
|
override fun onCreate() {
|
|
super.onCreate()
|
|
NativeRuntime.initialize(this)
|
|
// SharedPreferences reads its file on first use, and the first use was
|
|
// on the main thread — in the playback service's start callback among
|
|
// others. Read here, off it, and every later read is from memory.
|
|
Thread({ SettingsStore.preload(this) }, "settings-preload").start()
|
|
}
|
|
}
|