mirror of
https://github.com/2dust/v2rayNG.git
synced 2026-10-29 06:31:54 +00:00
Guard process finder init on Android Q+
This commit is contained in:
1 parent
fd57019e73
commit
0a0ef6e6b5
1 file changed
+2
-1
@@ -6,6 +6,7 @@ import android.content.Context
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
import android.net.ConnectivityManager
|
import android.net.ConnectivityManager
|
||||||
|
import android.os.Build
|
||||||
import android.os.ParcelFileDescriptor
|
import android.os.ParcelFileDescriptor
|
||||||
import android.system.OsConstants
|
import android.system.OsConstants
|
||||||
import com.v2ray.ang.util.LogUtil
|
import com.v2ray.ang.util.LogUtil
|
||||||
@@ -42,7 +43,7 @@ object V2RayServiceManager {
|
|||||||
field = value
|
field = value
|
||||||
val service = value?.get()?.getService()
|
val service = value?.get()?.getService()
|
||||||
V2RayNativeManager.initCoreEnv(service)
|
V2RayNativeManager.initCoreEnv(service)
|
||||||
if (service != null && processFinder == null) {
|
if (service != null && processFinder == null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||||
processFinder = XrayProcessFinder(service)
|
processFinder = XrayProcessFinder(service)
|
||||||
coreController.registerProcessFinder(processFinder)
|
coreController.registerProcessFinder(processFinder)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user