diff --git a/src/main/scala/com/github/shadowsocks/ServiceBoundContext.scala b/src/main/scala/com/github/shadowsocks/ServiceBoundContext.scala index f50cd606..76ec1f0c 100644 --- a/src/main/scala/com/github/shadowsocks/ServiceBoundContext.scala +++ b/src/main/scala/com/github/shadowsocks/ServiceBoundContext.scala @@ -4,6 +4,7 @@ import android.content.{ComponentName, Context, Intent, ServiceConnection} import android.os.{RemoteException, IBinder} import com.github.shadowsocks.aidl.{IShadowsocksServiceCallback, IShadowsocksService} import com.github.shadowsocks.utils.Action +import com.github.shadowsocks.utils.Utils /** * @author Mygod @@ -60,6 +61,8 @@ trait ServiceBoundContext extends Context { connection = new ShadowsocksServiceConnection() bindService(intent, connection, Context.BIND_AUTO_CREATE) + if (!Utils.isLollipopOrAbove) + startService(intent) } }