Commit 7d93ca5c authored by topjohnwu's avatar topjohnwu

Modernize MagiskInstaller

parent ac20063e
...@@ -41,12 +41,10 @@ open class App : Application() { ...@@ -41,12 +41,10 @@ open class App : Application() {
protectedContext = baseContext protectedContext = baseContext
self = this self = this
deContext = base
if (Build.VERSION.SDK_INT >= 24) { if (Build.VERSION.SDK_INT >= 24) {
protectedContext = base.createDeviceProtectedStorageContext() protectedContext = base.createDeviceProtectedStorageContext()
deContext = protectedContext protectedContext.moveSharedPreferencesFrom(base, base.defaultPrefsName)
deContext.moveSharedPreferencesFrom(base, base.defaultPrefsName)
} }
registerActivityLifecycleCallbacks(get()) registerActivityLifecycleCallbacks(get())
...@@ -69,11 +67,6 @@ open class App : Application() { ...@@ -69,11 +67,6 @@ open class App : Application() {
@JvmStatic @JvmStatic
lateinit var self: App lateinit var self: App
@SuppressLint("StaticFieldLeak")
@Deprecated("Use dependency injection; replace with protectedContext")
@JvmStatic
lateinit var deContext: Context
@Deprecated("Use Rx or similar") @Deprecated("Use Rx or similar")
@JvmField @JvmField
var THREAD_POOL: ThreadPoolExecutor var THREAD_POOL: ThreadPoolExecutor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment