diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-08-23 00:59:20 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-08-23 01:03:48 +0530 |
commit | 898bb679d2a6191afe15cebf59a0f60fe76385cb (patch) | |
tree | 61b43834184f536b2ef9cf0b1bc95333596e0564 | |
parent | 348d430cd372d6a9ba905e503af6b010db0bb1a0 (diff) |
ui: also enable StrictMode thread policy in debug builds
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r-- | ui/src/main/java/com/wireguard/android/Application.kt | 2 |
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()) } } |