Always start service on starting user interface

This commit is contained in:
M66B 2019-10-08 11:50:37 +02:00
parent 9372c8cd5d
commit e2d39edb5d
1 changed files with 6 additions and 1 deletions

View File

@ -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() {