mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-08 04:52:12 +00:00
Updated service to use extra transformer so the service itself is not plagued by unnecessary code
This commit is contained in:
committed by
John Wu
parent
78282c1a49
commit
7cd814d917
@@ -4,6 +4,8 @@ import android.content.Context
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.skoumal.teanity.rxbus.RxBus
|
||||
import com.topjohnwu.magisk.App
|
||||
import com.topjohnwu.magisk.model.download.ModuleTransformer
|
||||
import com.topjohnwu.magisk.model.entity.internal.DownloadSubject
|
||||
import org.koin.dsl.module
|
||||
|
||||
|
||||
@@ -15,4 +17,6 @@ val applicationModule = module {
|
||||
factory(Protected) { get<App>().protectedContext }
|
||||
single(SUTimeout) { get<Context>(Protected).getSharedPreferences("su_timeout", 0) }
|
||||
single { PreferenceManager.getDefaultSharedPreferences(get<Context>(Protected)) }
|
||||
|
||||
factory { (subject: DownloadSubject) -> ModuleTransformer(get(), subject) }
|
||||
}
|
||||
Reference in New Issue
Block a user