1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-02-24 23:23:08 +00:00

Always show error when not starting/reloading

This commit is contained in:
M66B 2016-07-06 08:22:12 +02:00
parent 24a1a452b0
commit ac6fb2e51c

View file

@ -346,8 +346,8 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex)); Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
if ((cmd == Command.start || cmd == Command.reload) && if (cmd == Command.start || cmd == Command.reload) {
VpnService.prepare(ServiceSinkhole.this) == null) { if (VpnService.prepare(ServiceSinkhole.this) == null) {
Log.w(TAG, "VPN not prepared"); Log.w(TAG, "VPN not prepared");
showAutoStartNotification(); showAutoStartNotification();
showErrorNotification(ex.toString()); showErrorNotification(ex.toString());
@ -359,6 +359,8 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
prefs.edit().putBoolean("enabled", false).apply(); prefs.edit().putBoolean("enabled", false).apply();
Widget.updateWidgets(ServiceSinkhole.this); Widget.updateWidgets(ServiceSinkhole.this);
} }
} else
showErrorNotification(ex.toString());
} }
} }