1package soy.iko.opencode
3import android.app.Application
4import soy.iko.opencode.data.repo.CrashLogger
5import soy.iko.opencode.di.AppContainer
6import java.util.concurrent.atomic.AtomicBoolean
8class OpencodeApp : Application() {
9 lateinit var container: AppContainer
12 private val shutdownCalled = AtomicBoolean(false)
14 override fun onCreate() {
16 CrashLogger.get(this).install()
17 container = AppContainer(this)
18 // onTerminate() is only called in emulated process environments, not on real
19 // devices. Register a JVM shutdown hook so cleanup (network callback unregister,
20 // scope cancellation, connection close) runs when the process is actually killed.
21 Runtime.getRuntime().addShutdownHook(Thread {
26 override fun onTerminate() {
31 private fun shutdown() {
32 // Guard against double shutdown — onTerminate and the shutdown hook can both
33 // fire in emulated environments.
34 if (!shutdownCalled.compareAndSet(false, true)) return
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list