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:
parent
28eb3f20a8
commit
d98604d9c5
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue