Guard process finder init on Android Q+

This commit is contained in:
2dust
2026-04-16 13:52:35 +08:00
parent fd57019e73
commit 0a0ef6e6b5
@@ -6,6 +6,7 @@ import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.net.ConnectivityManager
import android.os.Build
import android.os.ParcelFileDescriptor
import android.system.OsConstants
import com.v2ray.ang.util.LogUtil
@@ -42,7 +43,7 @@ object V2RayServiceManager {
field = value
val service = value?.get()?.getService()
V2RayNativeManager.initCoreEnv(service)
if (service != null && processFinder == null) {
if (service != null && processFinder == null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
processFinder = XrayProcessFinder(service)
coreController.registerProcessFinder(processFinder)
}