diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-02-15 18:52:06 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-02-16 15:07:20 +0530 |
commit | da1188c6ee877ffe9c8c5fe9ebea7f53f5c462d8 (patch) | |
tree | 97f607c418d8d2a01e9fe6bc95c26b946460a9d7 /app/src/main/java/com/wireguard/android | |
parent | e22cefbfe3fccb129dda5d33afbf04173a6c0604 (diff) |
Record StrictMode failures to logcat
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/java/com/wireguard/android')
-rw-r--r-- | app/src/main/java/com/wireguard/android/Application.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/Application.java b/app/src/main/java/com/wireguard/android/Application.java index 22572d54..bd848e66 100644 --- a/app/src/main/java/com/wireguard/android/Application.java +++ b/app/src/main/java/com/wireguard/android/Application.java @@ -12,6 +12,7 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Handler; import android.os.Looper; +import android.os.StrictMode; import android.util.Log; import androidx.preference.PreferenceManager; @@ -131,6 +132,10 @@ public class Application extends android.app.Application { startActivity(intent); System.exit(0); } + + if (BuildConfig.DEBUG) { + StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build()); + } } @Override |