Commit 946affb2 authored by Mygod's avatar Mygod

Fix #437

parent 408e7438
......@@ -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>
......
......@@ -442,7 +442,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
try {
conn = builder.establish()
if (conn == null) throw new Exception("Application not prepared.")
if (conn == null) changeState(State.STOPPED, getString(R.string.reboot_required))
} catch {
case ex: IllegalStateException =>
changeState(State.STOPPED, ex.getMessage)
......
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