Skip to content

Instantly share code, notes, and snippets.

@jreyes
Created April 13, 2016 03:31
Show Gist options
  • Save jreyes/b6f491d999abc98f5ac7f19a1c0151f6 to your computer and use it in GitHub Desktop.
Save jreyes/b6f491d999abc98f5ac7f19a1c0151f6 to your computer and use it in GitHub Desktop.
Strict development
if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectAll()
.penaltyLog()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectLeakedSqlLiteObjects()
.detectLeakedClosableObjects()
.penaltyLog()
.penaltyDeath()
.build());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment