summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-08-23 00:59:20 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-08-23 01:03:48 +0530
commit898bb679d2a6191afe15cebf59a0f60fe76385cb (patch)
tree61b43834184f536b2ef9cf0b1bc95333596e0564 /ui/src/main
parent348d430cd372d6a9ba905e503af6b010db0bb1a0 (diff)
ui: also enable StrictMode thread policy in debug builds
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/src/main')
-rw-r--r--ui/src/main/java/com/wireguard/android/Application.kt2
1 files changed, 2 insertions, 0 deletions
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())
}
}