From 898bb679d2a6191afe15cebf59a0f60fe76385cb Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 23 Aug 2020 00:59:20 +0530 Subject: ui: also enable StrictMode thread policy in debug builds Signed-off-by: Harsh Shandilya --- ui/src/main/java/com/wireguard/android/Application.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/src/main') diff --git a/ui/src/main/java/com/wireguard/android/Application.kt b/ui/src/main/java/com/wireguard/android/Application.kt index d533028f..5563fe62 100644 --- a/ui/src/main/java/com/wireguard/android/Application.kt +++ b/ui/src/main/java/com/wireguard/android/Application.kt @@ -14,6 +14,7 @@ import android.os.Handler import android.os.Looper import android.os.StrictMode import android.os.StrictMode.VmPolicy +import android.os.StrictMode.ThreadPolicy import android.util.Log import androidx.appcompat.app.AppCompatDelegate import androidx.preference.PreferenceManager @@ -53,6 +54,7 @@ class Application : android.app.Application(), OnSharedPreferenceChangeListener } if (BuildConfig.DEBUG) { StrictMode.setVmPolicy(VmPolicy.Builder().detectAll().penaltyLog().build()) + StrictMode.setThreadPolicy(ThreadPolicy.Builder().detectAll().penaltyLog().build()) } } -- cgit v1.2.3