mirror of https://github.com/M66B/NetGuard.git
Always start service on starting user interface
This commit is contained in:
parent
9372c8cd5d
commit
e2d39edb5d
|
@ -259,8 +259,13 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
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();
|
||||
}
|
||||
|
||||
// Network is metered
|
||||
ivMetered.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
|
|
Loading…
Reference in New Issue