Debugging an HTC device

This commit is contained in:
Mygod
2015-11-20 00:39:47 +08:00
parent 52cd6d1576
commit 408e74384e
2 changed files with 5 additions and 2 deletions
@@ -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) {