forked from organicmaps/organicmaps
Update MwmApplication.java
Signed-off-by: DevarshVasani <vasanidevarsh@gmail.com>
This commit is contained in:
parent
1e7e860213
commit
dcb486c661
1 changed files with 5 additions and 3 deletions
|
@ -232,14 +232,15 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||
StrictMode.ThreadPolicy.Builder threadPolicyBuilder = new StrictMode.ThreadPolicy.Builder()
|
||||
.detectDiskReads()
|
||||
.detectDiskWrites()
|
||||
.detectNetwork() // or .detectAll() for all detectable problems
|
||||
.detectNetwork()
|
||||
.detectCustomSlowCalls()
|
||||
.penaltyLog();
|
||||
|
||||
threadPolicyBuilder.detectCustomSlowCalls();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
{
|
||||
threadPolicyBuilder.detectResourceMismatches();
|
||||
threadPolicyBuilder.detectExplicitGc();
|
||||
}
|
||||
|
||||
StrictMode.setThreadPolicy(threadPolicyBuilder.build());
|
||||
|
@ -247,9 +248,10 @@ public class MwmApplication extends Application implements Application.ActivityL
|
|||
StrictMode.VmPolicy.Builder vmPolicyBuilder = new StrictMode.VmPolicy.Builder()
|
||||
.detectLeakedSqlLiteObjects()
|
||||
.detectLeakedClosableObjects()
|
||||
.detectFileUriExposure()
|
||||
.penaltyLog();
|
||||
|
||||
vmPolicyBuilder.detectFileUriExposure();
|
||||
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue