-
-
Save BartoszJarocki/2210b1c5a3a3b087a9874701faf9a065 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void enableStrictMode() { | |
if (BuildConfig.DEBUG) { | |
StrictMode.VmPolicy vmPolicy = new StrictMode.VmPolicy.Builder() | |
.detectAll() | |
.penaltyLog() | |
.penaltyDeath() | |
.build(); | |
StrictMode.setVmPolicy(vmPolicy); | |
StrictMode.ThreadPolicy threadPolicy = | |
new StrictMode.ThreadPolicy.Builder() | |
.detectAll() | |
.penaltyLog() | |
.build(); | |
StrictMode.setThreadPolicy(threadPolicy); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment