From 90598c2a79ed8c6c215970eb541760a2d080662f Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 24 Nov 2015 10:54:43 +0100 Subject: [PATCH] Added some logging --- app/app.iml | 3 +++ app/src/main/java/eu/faircode/netguard/SinkholeService.java | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/app.iml b/app/app.iml index 5e46a900..401abb40 100644 --- a/app/app.iml +++ b/app/app.iml @@ -66,6 +66,7 @@ + @@ -75,6 +76,8 @@ + + diff --git a/app/src/main/java/eu/faircode/netguard/SinkholeService.java b/app/src/main/java/eu/faircode/netguard/SinkholeService.java index 78e77339..f4baa8b5 100644 --- a/app/src/main/java/eu/faircode/netguard/SinkholeService.java +++ b/app/src/main/java/eu/faircode/netguard/SinkholeService.java @@ -417,11 +417,15 @@ public class SinkholeService extends VpnService { public int onStartCommand(Intent intent, int flags, int startId) { // Intent redelivery PowerManager.WakeLock wl = getLock(this); - if (!wl.isHeld()) + if (!wl.isHeld()) { + Log.w(TAG, "Wakelock not held"); wl.acquire(); + } // Handle service restart if (intent == null) { + Log.i(TAG, "Restart"); + // Get enabled SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); boolean enabled = prefs.getBoolean("enabled", false);