Commit 797b3fda authored by Max Lv's avatar Max Lv

Revert "Refine #530"

This reverts commit 292f22cc.
parent 292f22cc
...@@ -62,6 +62,7 @@ trait ServiceBoundContext extends Context with IBinder.DeathRecipient { ...@@ -62,6 +62,7 @@ trait ServiceBoundContext extends Context with IBinder.DeathRecipient {
connection = new ShadowsocksServiceConnection() connection = new ShadowsocksServiceConnection()
bindService(intent, connection, Context.BIND_AUTO_CREATE) bindService(intent, connection, Context.BIND_AUTO_CREATE)
startService(intent)
} }
} }
......
...@@ -43,7 +43,6 @@ import android.app.Service ...@@ -43,7 +43,6 @@ import android.app.Service
import android.content.Intent import android.content.Intent
import android.net.VpnService import android.net.VpnService
import android.os.{IBinder, Handler} import android.os.{IBinder, Handler}
import com.github.shadowsocks.utils.Action
import com.github.shadowsocks.utils.ConfigUtils import com.github.shadowsocks.utils.ConfigUtils
import com.github.shadowsocks.ShadowsocksApplication.app import com.github.shadowsocks.ShadowsocksApplication.app
...@@ -73,11 +72,6 @@ class ShadowsocksRunnerService extends Service with ServiceBoundContext { ...@@ -73,11 +72,6 @@ class ShadowsocksRunnerService extends Service with ServiceBoundContext {
override def onCreate() { override def onCreate() {
super.onCreate() super.onCreate()
attachService() attachService()
val s = if (app.isNatEnabled) classOf[ShadowsocksNatService] else classOf[ShadowsocksVpnService]
val intent = new Intent(this, s)
intent.setAction(Action.SERVICE)
startService(intent)
} }
override def onDestroy() { override def onDestroy() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment