Created
December 13, 2016 19:47
-
-
Save amitshekhariitbhu/faa094c76fecd106ff08efe428f0e605 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public void onCreate() { | |
if (DEVELOPER_MODE) { | |
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() | |
.detectDiskReads() | |
.detectDiskWrites() | |
.detectNetwork() // or .detectAll() for all detectable problems | |
.penaltyLog() | |
.build()); | |
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() | |
.detectLeakedSqlLiteObjects() | |
.detectLeakedClosableObjects() | |
.penaltyLog() | |
.penaltyDeath() | |
.build()); | |
} | |
super.onCreate(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment