Magisk/app/src/main/java/com/topjohnwu/magisk/di/ApplicationModule.kt

19 lines
461 B
Kotlin
Raw Normal View History

package com.topjohnwu.magisk.di
import android.content.Context
import com.skoumal.teanity.rxbus.RxBus
import com.topjohnwu.magisk.App
import org.koin.dsl.module
val applicationModule = module {
single { RxBus() }
single { get<Context>().resources }
single { get<Context>() as App }
single { get<Context>().packageManager }
single(SUTimeout) {
get<App>().protectedContext
.getSharedPreferences("su_timeout", 0)
}
}