720fca5919
ClippyAuto CI / build (push) Has been cancelled
- New AppConfig singleton backed by EncryptedSharedPreferences - Credentials stored in Android Keystore (AES256-GCM) - Removed hardcoded creds from ClippySession and SetupActivity - Access token caching to avoid re-login on each session - Defaults seeded on first run for backward compatibility Co-authored-by: Spirit <spirit@hobbs.farm>
29 lines
650 B
Kotlin
29 lines
650 B
Kotlin
package farm.hobbs.clippyauto
|
|
|
|
import android.app.Application
|
|
import farm.hobbs.clippyauto.config.AppConfig
|
|
import farm.hobbs.clippyauto.matrix.MatrixRestClient
|
|
|
|
class ClippyAutoApp : Application() {
|
|
|
|
lateinit var matrixClient: MatrixRestClient
|
|
private set
|
|
|
|
override fun onCreate() {
|
|
super.onCreate()
|
|
instance = this
|
|
|
|
// Initialize encrypted config before anything else
|
|
AppConfig.init(this)
|
|
|
|
matrixClient = MatrixRestClient(
|
|
homeserverUrl = AppConfig.homeserverUrl
|
|
)
|
|
}
|
|
|
|
companion object {
|
|
lateinit var instance: ClippyAutoApp
|
|
private set
|
|
}
|
|
}
|