Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit 3ef7c66

Browse files
committed
use exitProcess instead of Process.killProcess
1 parent 1d8d666 commit 3ef7c66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

topl-service/src/main/java/io/matthewnelson/topl_service/lifecycle/BackgroundManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
package io.matthewnelson.topl_service.lifecycle
6868

6969
import android.content.Context
70-
import android.os.Process
7170
import androidx.lifecycle.Lifecycle
7271
import androidx.lifecycle.LifecycleObserver
7372
import androidx.lifecycle.OnLifecycleEvent
@@ -77,6 +76,7 @@ import io.matthewnelson.topl_service.service.TorService
7776
import io.matthewnelson.topl_service.service.components.actions.ServiceActionProcessor
7877
import io.matthewnelson.topl_service.service.components.binding.TorServiceConnection
7978
import io.matthewnelson.topl_service.util.ServiceConsts
79+
import kotlin.system.exitProcess
8080

8181
/**
8282
* When your application is sent to the background (the Recent App's tray or lock screen), the
@@ -290,7 +290,7 @@ class BackgroundManager internal constructor(
290290
* */
291291
internal fun killAppProcess() {
292292
if (backgroundManager.killAppIfTaskIsRemoved && taskIsRemovedFromRecentApps) {
293-
Process.killProcess(Process.myPid())
293+
exitProcess(0)
294294
}
295295
}
296296
}

0 commit comments

Comments
 (0)