diff --git a/V2rayNG/app/.gitignore b/V2rayNG/app/.gitignore index 2abde4aab..e835ab2d9 100644 --- a/V2rayNG/app/.gitignore +++ b/V2rayNG/app/.gitignore @@ -1,2 +1,3 @@ /build +/release /google-services.json diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayTestService.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayTestService.kt index 980d777f3..6d6dc0aa9 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayTestService.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayTestService.kt @@ -24,12 +24,12 @@ class V2RayTestService : Service() { override fun onCreate() { super.onCreate() Seq.setContext(this) + Libv2ray.initV2Env(Utils.userAssetPath(this), Utils.getDeviceIdForXUDPBaseKey()) } override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { when (intent?.getIntExtra("key", 0)) { MSG_MEASURE_CONFIG -> { - Libv2ray.initV2Env(Utils.userAssetPath(this), Utils.getDeviceIdForXUDPBaseKey()) val contentPair = intent.getSerializableExtra("content") as Pair realTestScope.launch { val result = SpeedtestUtil.realPing(contentPair.second) @@ -41,7 +41,6 @@ class V2RayTestService : Service() { realTestScope.coroutineContext[Job]?.cancelChildren() } } - this.stopSelf(startId) return super.onStartCommand(intent, flags, startId) }