mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 05:44:14 +00:00
Always start service on starting user interface
This commit is contained in:
parent
9372c8cd5d
commit
e2d39edb5d
1 changed files with 6 additions and 1 deletions
|
@ -259,8 +259,13 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
||||||
ServiceSinkhole.stop("switch off", ActivityMain.this, false);
|
ServiceSinkhole.stop("switch off", ActivityMain.this, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (enabled)
|
if (enabled) {
|
||||||
|
Intent prepare = VpnService.prepare(ActivityMain.this);
|
||||||
|
if (prepare == null)
|
||||||
|
ServiceSinkhole.start("ui", this);
|
||||||
|
|
||||||
checkDoze();
|
checkDoze();
|
||||||
|
}
|
||||||
|
|
||||||
// Network is metered
|
// Network is metered
|
||||||
ivMetered.setOnLongClickListener(new View.OnLongClickListener() {
|
ivMetered.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
|
|
Loading…
Reference in a new issue