mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-24 07:10:50 +00:00
Suppress VPN start failed when no connectivity
This commit is contained in:
parent
f5d9332c63
commit
ca17b09d06
1 changed files with 5 additions and 3 deletions
|
@ -348,9 +348,11 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
||||||
|
|
||||||
if (cmd == Command.start || cmd == Command.reload) {
|
if (cmd == Command.start || cmd == Command.reload) {
|
||||||
if (VpnService.prepare(ServiceSinkhole.this) == null) {
|
if (VpnService.prepare(ServiceSinkhole.this) == null) {
|
||||||
Log.w(TAG, "VPN not prepared");
|
Log.w(TAG, "VPN not prepared connected=" + last_connected);
|
||||||
showAutoStartNotification();
|
if (last_connected) {
|
||||||
showErrorNotification(ex.toString());
|
showAutoStartNotification();
|
||||||
|
showErrorNotification(ex.toString());
|
||||||
|
}
|
||||||
// Retried on connectivity change
|
// Retried on connectivity change
|
||||||
} else {
|
} else {
|
||||||
showErrorNotification(ex.toString());
|
showErrorNotification(ex.toString());
|
||||||
|
|
Loading…
Reference in a new issue