Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StrictMode switch #21

Open
danielgomezrico opened this issue Feb 6, 2017 · 0 comments
Open

Add StrictMode switch #21

danielgomezrico opened this issue Feb 6, 2017 · 0 comments
Milestone

Comments

@danielgomezrico
Copy link
Contributor

danielgomezrico commented Feb 6, 2017

Enable with something like:

 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());

May help in debug/testing flow too.

https://blog.mindorks.com/use-strictmode-to-find-things-you-did-by-accident-in-android-development-4cf0e7c8d997#.6c7237l8q

@danielgomezrico danielgomezrico created this issue from a note in Debug Artist (Ideas) Feb 6, 2017
@danielgomezrico danielgomezrico added this to the 0.6 milestone Feb 6, 2017
@danielgomezrico danielgomezrico modified the milestones: 0.7, 0.6, 0.8 Apr 4, 2017
@danielgomezrico danielgomezrico moved this from Ideas to TODO in Debug Artist May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant