fix an issue

This commit is contained in:
Max Lv
2014-09-11 20:55:57 +08:00
parent e52719d1be
commit 6074a99eb6
3 changed files with 7 additions and 4 deletions
@@ -213,6 +213,8 @@ class Shadowsocks
setPreferenceEnabled(enabled = false)
}
state = bgService.getState
// set the listener
switchButton.setOnCheckedChangeListener(Shadowsocks.this)
}
override def onServiceDisconnected(name: ComponentName) {
@@ -746,9 +748,9 @@ class Shadowsocks
changeSwitch(checked = false)
}
state = bgService.getState
// set the listener
switchButton.setOnCheckedChangeListener(Shadowsocks.this)
}
// set the listener
switchButton.setOnCheckedChangeListener(Shadowsocks.this)
ConfigUtils.refresh(this)
}
@@ -565,6 +565,7 @@ class ShadowsocksNatService extends Service with BaseService {
unregisterReceiver(receiver)
receiver = null
}
stopForegroundCompat(1)
}