Commit 408e7438 authored by Mygod's avatar Mygod

Debugging an HTC device

parent 52cd6d15
......@@ -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) throw new Exception("Application not prepared.")
} 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) {
......
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