Commit 721e31d8 authored by Max Lv's avatar Max Lv

fix bug

parent 3d664377
......@@ -178,8 +178,11 @@ public class Shadowsocks extends UnifiedSherlockPreferenceActivity
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
if (compoundButton == switchButton) {
final SharedPreferences settings =
PreferenceManager.getDefaultSharedPreferences(Shadowsocks.this);
settings.edit().putBoolean("isRunning", true).commit();
if (!serviceStart()) {
switchButton.setChecked(false);
settings.edit().putBoolean("isRunning", false).commit();
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment