1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-03-15 08:29:02 +00:00

Synchronize service state

This commit is contained in:
M66B 2015-11-04 20:48:27 +01:00
parent 28eb3f20a8
commit d98604d9c5

View file

@ -124,6 +124,11 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
running = true;
boolean enabled = prefs.getBoolean("enabled", false);
if (enabled)
SinkholeService.start(this);
else
SinkholeService.stop(this);
// Action bar
actionView = getLayoutInflater().inflate(R.layout.action, null);
SwitchCompat swEnabled = (SwitchCompat) actionView.findViewById(R.id.swEnabled);