Skip to content

Commit

Permalink
Modernize MagiskInstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Jul 29, 2019
1 parent ac20063 commit 7d93ca5
Show file tree
Hide file tree
Showing 3 changed files with 357 additions and 359 deletions.
9 changes: 1 addition & 8 deletions app/src/main/java/com/topjohnwu/magisk/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ open class App : Application() {

protectedContext = baseContext
self = this
deContext = base

if (Build.VERSION.SDK_INT >= 24) {
protectedContext = base.createDeviceProtectedStorageContext()
deContext = protectedContext
deContext.moveSharedPreferencesFrom(base, base.defaultPrefsName)
protectedContext.moveSharedPreferencesFrom(base, base.defaultPrefsName)
}

registerActivityLifecycleCallbacks(get())
Expand All @@ -69,11 +67,6 @@ open class App : Application() {
@JvmStatic
lateinit var self: App

@SuppressLint("StaticFieldLeak")
@Deprecated("Use dependency injection; replace with protectedContext")
@JvmStatic
lateinit var deContext: Context

@Deprecated("Use Rx or similar")
@JvmField
var THREAD_POOL: ThreadPoolExecutor
Expand Down
351 changes: 0 additions & 351 deletions app/src/main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java

This file was deleted.

Loading

0 comments on commit 7d93ca5

Please sign in to comment.