GJain
GJain

Reputation: 5093

strict policy violation on inbuilt google apps

I get below error when I try to start native google maps app.

I execute this code on click on LinearLayout

                Uri gmmIntentUri = Uri.parse(geoInfo);
                Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
                mapIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                mapIntent.setPackage("com.google.android.apps.maps");
                if (mapIntent.resolveActivity(context.getPackageManager()) != null) {
                    context.startActivity(mapIntent);
                }

--Error I get

04-02 02:29:52.572  24137-24137/com.google.android.apps.maps D/StrictMode﹕ StrictMode policy violation; ~duration=184 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=31 violation=2
            at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1137)
            at libcore.io.BlockGuardOs.fstat(BlockGuardOs.java:132)
            at libcore.io.IoBridge.open(IoBridge.java:445)
            at java.io.FileInputStream.<init>(FileInputStream.java:76)
            at android.app.ContextImpl.openFileInput(ContextImpl.java:961)
            at android.content.ContextWrapper.openFileInput(ContextWrapper.java:176)
            at com.google.android.apps.gmm.shared.c.h.a(PG:149)
            at com.google.android.apps.gmm.shared.net.a.b.a(PG:587)
            at com.google.android.apps.gmm.map.n.f.a(PG:323)
            at com.google.android.apps.gmm.base.app.d.<init>(PG:540)
            at com.google.android.apps.gmm.base.app.GoogleMapsApplication.onCreate(PG:84)
            at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
            at android.app.ActivityThread.access$1500(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)

How do I resolve this?

Upvotes: 0

Views: 514

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007534

Error I get

That is not an error. It is being logged at debug severity.

How do I resolve this?

You don't. There is no problem in your app. Google left StrictMode enabled in logging mode in their app. That is their choice to make.

Upvotes: 1

Related Questions