1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-25 01:07:52 +00:00

Added some logging

This commit is contained in:
M66B 2015-11-24 10:54:43 +01:00
parent 6565938101
commit 90598c2a79
2 changed files with 8 additions and 1 deletions

View file

@ -66,6 +66,7 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/renderscript" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/renderscript" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes-proguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/debug" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/debug" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
@ -75,6 +76,8 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/release" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />

View file

@ -417,11 +417,15 @@ public class SinkholeService extends VpnService {
public int onStartCommand(Intent intent, int flags, int startId) { public int onStartCommand(Intent intent, int flags, int startId) {
// Intent redelivery // Intent redelivery
PowerManager.WakeLock wl = getLock(this); PowerManager.WakeLock wl = getLock(this);
if (!wl.isHeld()) if (!wl.isHeld()) {
Log.w(TAG, "Wakelock not held");
wl.acquire(); wl.acquire();
}
// Handle service restart // Handle service restart
if (intent == null) { if (intent == null) {
Log.i(TAG, "Restart");
// Get enabled // Get enabled
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean enabled = prefs.getBoolean("enabled", false); boolean enabled = prefs.getBoolean("enabled", false);