Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3643213d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix StrictMode violation." into main

parents e449fe75 a36a6edb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -67,12 +67,15 @@ public class ChildZygoteProcess extends ZygoteProcess {
        if (mDead.get()) {
            return true;
        }
        StrictMode.ThreadPolicy oldStrictModeThreadPolicy = StrictMode.allowThreadDiskReads();
        try {
            if (Os.stat("/proc/" + mPid).st_uid == mUid) {
                return false;
            }
        } catch (ErrnoException e) {
            // Do nothing, it's dead.
        } finally {
            StrictMode.setThreadPolicy(oldStrictModeThreadPolicy);
        }
        mDead.set(true);
        return true;