Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

exempt a disk read from StrictMode as stetho is strictly a debug orie… #713

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jijichen
Copy link

Violation:

StrictMode policy violation; ~duration=5 ms: android.os.strictmode.DiskReadViolation
    at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1596)
    at libcore.io.BlockGuardOs.fstat(BlockGuardOs.java:174)
    at libcore.io.ForwardingOs.fstat(ForwardingOs.java:106)
    at libcore.io.IoBridge.open(IoBridge.java:481)
    at java.io.FileInputStream.<init>(FileInputStream.java:160)
    at java.io.FileInputStream.<init>(FileInputStream.java:115)
    at com.facebook.stetho.common.ProcessUtil.readProcessName(ProcessUtil.java:49)
    at com.facebook.stetho.common.ProcessUtil.getProcessName(ProcessUtil.java:38)
    at com.facebook.stetho.server.AddressNameHelper.createCustomAddress(AddressNameHelper.java:20)
    at com.facebook.stetho.Stetho$Initializer.start(Stetho.java:449)
    at com.facebook.stetho.Stetho.initialize(Stetho.java:134)

But "/proc/self/cmdline is a memory file and won't actually hit disk"
thus it can be exempted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants