This commit is contained in:
Mygod
2015-12-06 00:02:29 +08:00
parent c6a7560bae
commit 8c2690c0fb
3 changed files with 13 additions and 14 deletions
@@ -67,7 +67,7 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan
})
}
override def onResume = {
override def onResume {
super.onResume
isProxyApps.setChecked(ShadowsocksApplication.settings.getBoolean(Key.isProxyApps, false)) // update
}
@@ -75,9 +75,8 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan
def onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) = key match {
case Key.isNAT => if (ShadowsocksApplication.isRoot && activity != null) {
activity.handler.post(() => {
val intent = activity.getIntent
activity.finish()
startActivity(intent)
activity.deattachService
activity.attachService
})
}
case _ =>