mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 16:07:39 +00:00
Support Cuttlefish
This commit is contained in:
parent
659dd09723
commit
bbb8efe92c
@ -19,7 +19,6 @@ import com.topjohnwu.magisk.core.utils.NetworkObserver
|
|||||||
import com.topjohnwu.magisk.core.utils.ProcessLifecycle
|
import com.topjohnwu.magisk.core.utils.ProcessLifecycle
|
||||||
import com.topjohnwu.magisk.core.utils.RootUtils
|
import com.topjohnwu.magisk.core.utils.RootUtils
|
||||||
import com.topjohnwu.magisk.core.utils.ShellInit
|
import com.topjohnwu.magisk.core.utils.ShellInit
|
||||||
import com.topjohnwu.magisk.view.Notifications
|
|
||||||
import com.topjohnwu.superuser.Shell
|
import com.topjohnwu.superuser.Shell
|
||||||
import com.topjohnwu.superuser.internal.UiThreadHandler
|
import com.topjohnwu.superuser.internal.UiThreadHandler
|
||||||
import com.topjohnwu.superuser.ipc.RootService
|
import com.topjohnwu.superuser.ipc.RootService
|
||||||
@ -103,7 +102,6 @@ object AppContext : ContextWrapper(null),
|
|||||||
val lm = getSystemService(LocaleManager::class.java)
|
val lm = getSystemService(LocaleManager::class.java)
|
||||||
lm.overrideLocaleConfig = LocaleSetting.localeConfig
|
lm.overrideLocaleConfig = LocaleSetting.localeConfig
|
||||||
}
|
}
|
||||||
Notifications.setup()
|
|
||||||
ProcessLifecycle.init(this)
|
ProcessLifecycle.init(this)
|
||||||
NetworkObserver.init(this)
|
NetworkObserver.init(this)
|
||||||
if (!BuildConfig.DEBUG && !isRunningAsStub) {
|
if (!BuildConfig.DEBUG && !isRunningAsStub) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.topjohnwu.magisk.core
|
package com.topjohnwu.magisk.core
|
||||||
|
|
||||||
import android.app.KeyguardManager
|
import android.app.KeyguardManager
|
||||||
|
import android.os.Build
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import com.topjohnwu.magisk.StubApk
|
import com.topjohnwu.magisk.StubApk
|
||||||
import com.topjohnwu.magisk.core.ktx.getProperty
|
import com.topjohnwu.magisk.core.ktx.getProperty
|
||||||
@ -48,8 +49,9 @@ object Info {
|
|||||||
|
|
||||||
var hasGMS = true
|
var hasGMS = true
|
||||||
val isEmulator =
|
val isEmulator =
|
||||||
getProperty("ro.kernel.qemu", "0") == "1" ||
|
Build.DEVICE.contains("vsoc")
|
||||||
getProperty("ro.boot.qemu", "0") == "1"
|
|| getProperty("ro.kernel.qemu", "0") == "1"
|
||||||
|
|| getProperty("ro.boot.qemu", "0") == "1"
|
||||||
|
|
||||||
val isConnected = MutableLiveData(false)
|
val isConnected = MutableLiveData(false)
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import com.topjohnwu.magisk.core.isRunningAsStub
|
|||||||
import com.topjohnwu.magisk.core.ktx.writeTo
|
import com.topjohnwu.magisk.core.ktx.writeTo
|
||||||
import com.topjohnwu.magisk.core.tasks.AppMigration
|
import com.topjohnwu.magisk.core.tasks.AppMigration
|
||||||
import com.topjohnwu.magisk.core.utils.RootUtils
|
import com.topjohnwu.magisk.core.utils.RootUtils
|
||||||
|
import com.topjohnwu.magisk.view.Notifications
|
||||||
import com.topjohnwu.magisk.view.Shortcuts
|
import com.topjohnwu.magisk.view.Shortcuts
|
||||||
import com.topjohnwu.superuser.Shell
|
import com.topjohnwu.superuser.Shell
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@ -147,6 +148,7 @@ class SplashController<T>(private val activity: T)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Notifications.setup()
|
||||||
JobService.schedule(this)
|
JobService.schedule(this)
|
||||||
Shortcuts.setupDynamic(this)
|
Shortcuts.setupDynamic(this)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user