2019-04-11 18:01:49 +00:00
|
|
|
package com.topjohnwu.magisk.di
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
import com.skoumal.teanity.rxbus.RxBus
|
2019-04-12 22:14:37 +00:00
|
|
|
import com.topjohnwu.magisk.App
|
2019-04-11 18:01:49 +00:00
|
|
|
import org.koin.dsl.module
|
|
|
|
|
|
|
|
|
|
|
|
val applicationModule = module {
|
|
|
|
single { RxBus() }
|
|
|
|
single { get<Context>().resources }
|
2019-04-12 22:14:37 +00:00
|
|
|
single { get<Context>() as App }
|
2019-04-17 16:27:03 +00:00
|
|
|
single { get<Context>().packageManager }
|
2019-04-26 19:23:25 +00:00
|
|
|
single(SUTimeout) {
|
|
|
|
get<App>().protectedContext
|
|
|
|
.getSharedPreferences("su_timeout", 0)
|
|
|
|
}
|
2019-04-11 18:01:49 +00:00
|
|
|
}
|