From b620a2e66671ef894846dbb6202a9c76d898d9f3 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Tue, 12 Jan 2016 12:18:52 +0800 Subject: [PATCH] Fix #530 --- .../scala/com/github/shadowsocks/ServiceBoundContext.scala | 3 +++ 1 file changed, 3 insertions(+) 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) } }