Skip to content

Instantly share code, notes, and snippets.

@kherembourg
Last active May 2, 2018 14:19
Show Gist options
  • Save kherembourg/38b68046951f957d20e51056040deea2 to your computer and use it in GitHub Desktop.
Save kherembourg/38b68046951f957d20e51056040deea2 to your computer and use it in GitHub Desktop.
StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.penaltyLog()
.build())
StrictMode.setVmPolicy(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