Remove Koin

Non static DI is bad
This commit is contained in:
topjohnwu
2021-04-18 04:46:11 -07:00
parent 649b49ff45
commit 038f73a5f7
56 changed files with 194 additions and 306 deletions
@@ -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 {