From 0a0ef6e6b5f4ce7efe0516308ecc94a9e8f82b72 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Thu, 16 Apr 2026 13:52:35 +0800 Subject: [PATCH] Guard process finder init on Android Q+ --- .../src/main/java/com/v2ray/ang/handler/V2RayServiceManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2RayServiceManager.kt b/V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2RayServiceManager.kt index 875d38155..f86a29bb6 100644 --- a/V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2RayServiceManager.kt +++ b/V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2RayServiceManager.kt @@ -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) }