bump version
This commit is contained in:
+2
-2
@@ -5,8 +5,8 @@ import sbtandroid._
|
||||
import sbtandroid.AndroidPlugin._
|
||||
|
||||
object App {
|
||||
val version = "2.0.7"
|
||||
val versionCode = 58
|
||||
val version = "2.0.8"
|
||||
val versionCode = 59
|
||||
}
|
||||
|
||||
object General {
|
||||
|
||||
@@ -73,9 +73,6 @@
|
||||
android:name=".ShadowsocksNatService"
|
||||
android:process=":proxy"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.github.shadowsocks.ShadowsocksNatService"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service
|
||||
@@ -85,7 +82,6 @@
|
||||
android:permission="android.permission.BIND_VPN_SERVICE"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.github.shadowsocks.ShadowsocksVpnService"/>
|
||||
<action android:name="android.net.VpnService"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<string name="forward_stop">后台服务已停止。</string>
|
||||
<string name="service_failed">请检查你的网络状态后并重试。</string>
|
||||
<string name="stop">停止服务</string>
|
||||
<string name="vpn_status">您仅能通过通知栏关闭 VPN 服务</string>
|
||||
<string name="vpn_status">推荐通过通知栏关闭 VPN 服务</string>
|
||||
<string name="vpn_error">无法启动 VPN 服务:\"%s\"。看来和你的设备存在兼容性问题,请使用 Root 模式。</string>
|
||||
<string name="ok_iknow">确定</string>
|
||||
<string name="port_alert">端口号应大于1024</string>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<string name="forward_stop">Shadowsocks stopped.</string>
|
||||
<string name="service_failed">Please check your network status and try again.</string>
|
||||
<string name="stop">Stop the service</string>
|
||||
<string name="vpn_status">You can only disable the VPN service through the notification bar.</string>
|
||||
<string name="vpn_status">Recommend to disable the VPN service through the notification bar.</string>
|
||||
<string name="vpn_error">Unable to start VPN service: "%s". It seems to be a compatibility issue with your device. Please consider using ROOT mode instead.</string>
|
||||
|
||||
<!-- alert category -->
|
||||
|
||||
@@ -610,8 +610,10 @@ class Shadowsocks
|
||||
if (bgService == null) {
|
||||
val isRoot = status.getBoolean(Key.isRoot, false)
|
||||
val s = if (isRoot) classOf[ShadowsocksNatService] else classOf[ShadowsocksVpnService]
|
||||
bindService(new Intent(s.getName), connection, Context.BIND_AUTO_CREATE)
|
||||
startService(new Intent(Shadowsocks.this, s))
|
||||
val intent = new Intent(this, s)
|
||||
intent.setAction(Action.SERVICE)
|
||||
bindService(intent, connection, Context.BIND_AUTO_CREATE)
|
||||
startService(new Intent(this, s))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
}
|
||||
|
||||
def onBind(intent: Intent): IBinder = {
|
||||
if (classOf[ShadowsocksNatService].getName equals intent.getAction) {
|
||||
if (Action.SERVICE == intent.getAction) {
|
||||
binder
|
||||
} else {
|
||||
null
|
||||
|
||||
@@ -64,7 +64,9 @@ class ShadowsocksReceiver extends BroadcastReceiver {
|
||||
val isAutoConnect: Boolean = settings.getBoolean(Key.isAutoConnect, false)
|
||||
val isInstalled: Boolean = status.getBoolean(versionName, false)
|
||||
if (isAutoConnect && isInstalled) {
|
||||
context.startActivity(new Intent(context, classOf[ShadowsocksRunnerActivity]))
|
||||
val intent = new Intent(context, classOf[ShadowsocksRunnerActivity])
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,9 @@ class ShadowsocksRunnerActivity extends Activity {
|
||||
def attachService() {
|
||||
if (bgService == null) {
|
||||
val s = if (isRoot) classOf[ShadowsocksNatService] else classOf[ShadowsocksVpnService]
|
||||
bindService(new Intent(s.getName), connection, Context.BIND_AUTO_CREATE)
|
||||
val intent = new Intent(this, s)
|
||||
intent.setAction(Action.SERVICE)
|
||||
bindService(intent, connection, Context.BIND_AUTO_CREATE)
|
||||
startService(new Intent(this, s))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
|
||||
val action = intent.getAction
|
||||
if (VpnService.SERVICE_INTERFACE == action) {
|
||||
return super.onBind(intent)
|
||||
} else if (classOf[ShadowsocksVpnService].getName == action) {
|
||||
} else if (Action.SERVICE == action) {
|
||||
return binder
|
||||
}
|
||||
null
|
||||
|
||||
@@ -59,7 +59,8 @@ object State {
|
||||
}
|
||||
|
||||
object Action {
|
||||
val SERVICE = "com.github.shadowsocks.SERVICE"
|
||||
val CLOSE = "com.github.shadowsocks.CLOSE"
|
||||
val UPDATE_FRAGMENT = "com.github.shadowsocks.ACTION_UPDATE_FRAGMENT"
|
||||
val UPDATE_PREFS = "com.github.shadowsocks.ACTION_UPDATE_PREFS"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user