Record StrictMode failures to logcat

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-02-15 18:52:06 +05:30
parent e22cefbfe3
commit da1188c6ee

View File

@ -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