refine service close

This commit is contained in:
Max Lv
2013-06-10 20:58:44 +08:00
parent 82849540ba
commit 7e7a61c6c0
@@ -567,12 +567,7 @@ class Shadowsocks
}
def serviceStop() {
if (ShadowVpnService.isServiceStarted(this)) {
stopService(new Intent(this, classOf[ShadowVpnService]))
}
if (ShadowsocksService.isServiceStarted(this)) {
sendBroadcast(new Intent(Action.CLOSE))
}
sendBroadcast(new Intent(Action.CLOSE))
}
/** Called when connect button is clicked. */