1
0
Fork 0
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:
M66B 2016-07-07 07:15:44 +02:00
parent f5d9332c63
commit ca17b09d06

View file

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