add TrafficMonitor to the main activity

This commit is contained in:
Max Lv
2015-11-18 14:02:29 +08:00
parent 92e72830bb
commit f0abbb7304
8 changed files with 48 additions and 6 deletions
@@ -144,6 +144,8 @@ class ShadowsocksVpnService extends VpnService with BaseService {
override def stopRunner() {
TrafficMonitor.reset()
if (vpnThread != null) {
vpnThread.stopThread()
vpnThread = null
@@ -217,6 +219,8 @@ class ShadowsocksVpnService extends VpnService with BaseService {
override def startRunner(c: Config) {
TrafficMonitor.reset()
vpnThread = new ShadowsocksVpnThread(this)
vpnThread.start()