You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Remove Koin
Non static DI is bad
This commit is contained in:
@@ -6,7 +6,7 @@ import androidx.databinding.BindingAdapter
|
||||
|
||||
abstract class TextHolder {
|
||||
|
||||
abstract val isEmpty: Boolean
|
||||
open val isEmpty: Boolean get() = false
|
||||
abstract fun getText(resources: Resources): CharSequence
|
||||
|
||||
// ---
|
||||
|
||||
@@ -8,17 +8,17 @@ import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.core.Config
|
||||
import com.topjohnwu.magisk.core.Const
|
||||
import com.topjohnwu.magisk.core.Info
|
||||
import com.topjohnwu.magisk.ktx.get
|
||||
import com.topjohnwu.magisk.di.AppContext
|
||||
import com.topjohnwu.superuser.internal.UiThreadHandler
|
||||
|
||||
object Utils {
|
||||
|
||||
fun toast(msg: CharSequence, duration: Int) {
|
||||
UiThreadHandler.run { Toast.makeText(get(), msg, duration).show() }
|
||||
UiThreadHandler.run { Toast.makeText(AppContext, msg, duration).show() }
|
||||
}
|
||||
|
||||
fun toast(resId: Int, duration: Int) {
|
||||
UiThreadHandler.run { Toast.makeText(get(), resId, duration).show() }
|
||||
UiThreadHandler.run { Toast.makeText(AppContext, resId, duration).show() }
|
||||
}
|
||||
|
||||
fun showSuperUser(): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user