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

Commit cbf5d456 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[Bugfix] Add reading timeout when waiting for the reply of an...

Merge "[Bugfix] Add reading timeout when waiting for the reply of an application zygote." am: 5a3d9024 am: 4c0abd32 am: 5e835994

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2363779



Change-Id: I007917a831424d9dffcddfd9d29d97548e6205eb
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d0966d40 5e835994
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -73,6 +73,8 @@ public class ZygoteProcess {

    private static final int ZYGOTE_CONNECT_TIMEOUT_MS = 20000;

    private static final int APPLICATION_ZYGOTE_READ_TIMEOUT_MS = 5000;

    /**
     * Use a relatively short delay, because for app zygote, this is in the critical path of
     * service launch.
@@ -1109,6 +1111,9 @@ public class ZygoteProcess {

            state.mZygoteOutputWriter.flush();

            // The system_server should not be blocked by a defective or bad application zygote.
            state.mZygoteSessionSocket.setSoTimeout(APPLICATION_ZYGOTE_READ_TIMEOUT_MS);

            return (state.mZygoteInputStream.readInt() == 0);
        }
    }