Skip to content

Commit

Permalink
revert TestService stopSelf
Browse files Browse the repository at this point in the history
  • Loading branch information
GFW-knocker committed Aug 28, 2024
1 parent 127c255 commit fcfda0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions V2rayNG/app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/build
/release
/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String>
realTestScope.launch {
val result = SpeedtestUtil.realPing(contentPair.second)
Expand All @@ -41,7 +41,6 @@ class V2RayTestService : Service() {
realTestScope.coroutineContext[Job]?.cancelChildren()
}
}
this.stopSelf(startId)
return super.onStartCommand(intent, flags, startId)
}

Expand Down

0 comments on commit fcfda0e

Please sign in to comment.