+1
-1
@@ -1,5 +1,5 @@
|
||||
resolvers += Resolver.url("scalasbt releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots"))(Resolver.ivyStylePatterns)
|
||||
addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.5.8")
|
||||
addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.5.9")
|
||||
|
||||
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<string name="stop">停止服务</string>
|
||||
<string name="stopping">正在关闭……</string>
|
||||
<string name="vpn_error">后台服务启动失败:%s</string>
|
||||
<string name="reboot_required">VPN 服务启动失败。你可能需要重启设备。</string>
|
||||
<string name="close">关闭</string>
|
||||
<string name="proxy_empty">代理服务器地址不能为空</string>
|
||||
<string name="connect">连接</string>
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
<string name="stop">Stop the service</string>
|
||||
<string name="stopping">Shutting down…</string>
|
||||
<string name="vpn_error">%s</string>
|
||||
<string name="reboot_required">Failed to start VPN service. You might need to reboot your device.</string>
|
||||
|
||||
<!-- alert category -->
|
||||
<string name="close">Close</string>
|
||||
|
||||
@@ -337,7 +337,7 @@ class Shadowsocks
|
||||
if (intent != null) {
|
||||
startActivityForResult(intent, Shadowsocks.REQUEST_CONNECT)
|
||||
} else {
|
||||
onActivityResult(Shadowsocks.REQUEST_CONNECT, Activity.RESULT_OK, null)
|
||||
handler.post(() => onActivityResult(Shadowsocks.REQUEST_CONNECT, Activity.RESULT_OK, null))
|
||||
}
|
||||
} else {
|
||||
serviceStart()
|
||||
|
||||
@@ -442,11 +442,14 @@ class ShadowsocksVpnService extends VpnService with BaseService {
|
||||
|
||||
try {
|
||||
conn = builder.establish()
|
||||
if (conn == null) changeState(State.STOPPED, getString(R.string.reboot_required))
|
||||
} catch {
|
||||
case ex: IllegalStateException =>
|
||||
changeState(State.STOPPED, ex.getMessage)
|
||||
conn = null
|
||||
case ex: Exception => conn = null
|
||||
case ex: Exception =>
|
||||
ex.printStackTrace()
|
||||
conn = null
|
||||
}
|
||||
|
||||
if (conn == null) {
|
||||
|
||||
Reference in New Issue
Block a user