This commit is contained in:
Max Lv
2014-07-25 20:53:17 +08:00
parent 4e22d26e84
commit 31a5cff956
5 changed files with 28 additions and 21 deletions
@@ -310,9 +310,12 @@ class ShadowsocksNatService extends Service with BaseService {
}
override def onStartCommand(intent: Intent, flags: Int, startId: Int): Int = {
Service.START_NOT_STICKY
Service.START_STICKY
}
override def onTaskRemoved(intent: Intent) {
stopRunner()
}
def killProcesses() {
Console.runRootCommand(Utils.getIptables + " -t nat -F OUTPUT")
@@ -256,7 +256,11 @@ class ShadowsocksVpnService extends VpnService with BaseService {
}
override def onStartCommand(intent: Intent, flags: Int, startId: Int): Int = {
Service.START_NOT_STICKY
Service.START_STICKY
}
override def onTaskRemoved(intent: Intent) {
stopRunner()
}
override def onRevoke() {