diff --git a/app/core/src/main/java/com/topjohnwu/magisk/core/AppContext.kt b/app/core/src/main/java/com/topjohnwu/magisk/core/AppContext.kt index c20055ba9..607333918 100644 --- a/app/core/src/main/java/com/topjohnwu/magisk/core/AppContext.kt +++ b/app/core/src/main/java/com/topjohnwu/magisk/core/AppContext.kt @@ -19,7 +19,6 @@ import com.topjohnwu.magisk.core.utils.NetworkObserver import com.topjohnwu.magisk.core.utils.ProcessLifecycle import com.topjohnwu.magisk.core.utils.RootUtils import com.topjohnwu.magisk.core.utils.ShellInit -import com.topjohnwu.magisk.view.Notifications import com.topjohnwu.superuser.Shell import com.topjohnwu.superuser.internal.UiThreadHandler import com.topjohnwu.superuser.ipc.RootService @@ -103,7 +102,6 @@ object AppContext : ContextWrapper(null), val lm = getSystemService(LocaleManager::class.java) lm.overrideLocaleConfig = LocaleSetting.localeConfig } - Notifications.setup() ProcessLifecycle.init(this) NetworkObserver.init(this) if (!BuildConfig.DEBUG && !isRunningAsStub) { diff --git a/app/core/src/main/java/com/topjohnwu/magisk/core/Info.kt b/app/core/src/main/java/com/topjohnwu/magisk/core/Info.kt index d7a45e6f6..9aba84163 100644 --- a/app/core/src/main/java/com/topjohnwu/magisk/core/Info.kt +++ b/app/core/src/main/java/com/topjohnwu/magisk/core/Info.kt @@ -1,6 +1,7 @@ package com.topjohnwu.magisk.core import android.app.KeyguardManager +import android.os.Build import androidx.lifecycle.MutableLiveData import com.topjohnwu.magisk.StubApk import com.topjohnwu.magisk.core.ktx.getProperty @@ -48,8 +49,9 @@ object Info { var hasGMS = true val isEmulator = - getProperty("ro.kernel.qemu", "0") == "1" || - getProperty("ro.boot.qemu", "0") == "1" + Build.DEVICE.contains("vsoc") + || getProperty("ro.kernel.qemu", "0") == "1" + || getProperty("ro.boot.qemu", "0") == "1" val isConnected = MutableLiveData(false) diff --git a/app/core/src/main/java/com/topjohnwu/magisk/core/base/SplashScreen.kt b/app/core/src/main/java/com/topjohnwu/magisk/core/base/SplashScreen.kt index 338509797..8f604b85d 100644 --- a/app/core/src/main/java/com/topjohnwu/magisk/core/base/SplashScreen.kt +++ b/app/core/src/main/java/com/topjohnwu/magisk/core/base/SplashScreen.kt @@ -19,6 +19,7 @@ import com.topjohnwu.magisk.core.isRunningAsStub import com.topjohnwu.magisk.core.ktx.writeTo import com.topjohnwu.magisk.core.tasks.AppMigration import com.topjohnwu.magisk.core.utils.RootUtils +import com.topjohnwu.magisk.view.Notifications import com.topjohnwu.magisk.view.Shortcuts import com.topjohnwu.superuser.Shell import kotlinx.coroutines.launch @@ -147,6 +148,7 @@ class SplashController(private val activity: T) return } + Notifications.setup() JobService.schedule(this) Shortcuts.setupDynamic(this)