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

Commit 6e3c7ced authored by Chris Wailes's avatar Chris Wailes
Browse files

Code cleanup to conform to style guide / linter.

This commit made the following changes to make the code conform to the
Frameworks style guide:
* Re-named variables
* Re-flowed code
* Organized includes

Topic: zygote-prefork
Test: make & flash & launch apps
Bug: 68253328
Change-Id: I9274b32f1f606f29f6eb3a1e5068ca18f607afe7
Merged-In: I9274b32f1f606f29f6eb3a1e5068ca18f607afe7
parent 8b35ba25
Loading
Loading
Loading
Loading
+2 −13
Original line number Original line Diff line number Diff line
@@ -29,16 +29,6 @@ import dalvik.system.VMRuntime;
public class Process {
public class Process {
    private static final String LOG_TAG = "Process";
    private static final String LOG_TAG = "Process";


    /**
     * @hide for internal use only.
     */
    public static final String ZYGOTE_SOCKET = "zygote";

    /**
     * @hide for internal use only.
     */
    public static final String SECONDARY_ZYGOTE_SOCKET = "zygote_secondary";

    /**
    /**
     * An invalid UID value.
     * An invalid UID value.
     */
     */
@@ -454,8 +444,7 @@ public class Process {
     * State associated with the zygote process.
     * State associated with the zygote process.
     * @hide
     * @hide
     */
     */
    public static final ZygoteProcess zygoteProcess =
    public static final ZygoteProcess ZYGOTE_PROCESS = new ZygoteProcess();
            new ZygoteProcess(ZYGOTE_SOCKET, SECONDARY_ZYGOTE_SOCKET);


    /**
    /**
     * Start a new process.
     * Start a new process.
@@ -507,7 +496,7 @@ public class Process {
                                  String appDataDir,
                                  String appDataDir,
                                  String invokeWith,
                                  String invokeWith,
                                  String[] zygoteArgs) {
                                  String[] zygoteArgs) {
        return zygoteProcess.start(processClass, niceName, uid, gid, gids,
        return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids,
                    runtimeFlags, mountExternal, targetSdkVersion, seInfo,
                    runtimeFlags, mountExternal, targetSdkVersion, seInfo,
                    abi, instructionSet, appDataDir, invokeWith, zygoteArgs);
                    abi, instructionSet, appDataDir, invokeWith, zygoteArgs);
    }
    }
+145 −100
Original line number Original line Diff line number Diff line
@@ -58,87 +58,119 @@ import java.util.UUID;
 * {@hide}
 * {@hide}
 */
 */
public class ZygoteProcess {
public class ZygoteProcess {

    /**
     * @hide for internal use only.
     */
    public static final String ZYGOTE_SOCKET_NAME = "zygote";

    /**
     * @hide for internal use only.
     */
    public static final String ZYGOTE_SECONDARY_SOCKET_NAME = "zygote_secondary";

    /**
     * @hide for internal use only
     */
    private static final String LOG_TAG = "ZygoteProcess";
    private static final String LOG_TAG = "ZygoteProcess";


    /**
    /**
     * The name of the socket used to communicate with the primary zygote.
     * The name of the socket used to communicate with the primary zygote.
     */
     */
    private final LocalSocketAddress mSocket;
    private final LocalSocketAddress mZygoteSocketAddress;


    /**
    /**
     * The name of the secondary (alternate ABI) zygote socket.
     * The name of the secondary (alternate ABI) zygote socket.
     */
     */
    private final LocalSocketAddress mSecondarySocket;
    private final LocalSocketAddress mZygoteSecondarySocketAddress;


    public ZygoteProcess(String primarySocket, String secondarySocket) {
    public ZygoteProcess() {
        this(new LocalSocketAddress(primarySocket, LocalSocketAddress.Namespace.RESERVED),
        mZygoteSocketAddress =
                new LocalSocketAddress(secondarySocket, LocalSocketAddress.Namespace.RESERVED));
                new LocalSocketAddress(ZYGOTE_SOCKET_NAME, LocalSocketAddress.Namespace.RESERVED);
        mZygoteSecondarySocketAddress =
                new LocalSocketAddress(ZYGOTE_SECONDARY_SOCKET_NAME,
                                       LocalSocketAddress.Namespace.RESERVED);
    }
    }


    public ZygoteProcess(LocalSocketAddress primarySocket, LocalSocketAddress secondarySocket) {
    public ZygoteProcess(LocalSocketAddress primarySocketAddress,
        mSocket = primarySocket;
                         LocalSocketAddress secondarySocketAddress) {
        mSecondarySocket = secondarySocket;
        mZygoteSocketAddress = primarySocketAddress;
        mZygoteSecondarySocketAddress = secondarySocketAddress;
    }
    }


    public LocalSocketAddress getPrimarySocketAddress() {
    public LocalSocketAddress getPrimarySocketAddress() {
        return mSocket;
        return mZygoteSocketAddress;
    }
    }


    /**
    /**
     * State for communicating with the zygote process.
     * State for communicating with the zygote process.
     */
     */
    public static class ZygoteState {
    public static class ZygoteState {
        final LocalSocket socket;
        final LocalSocketAddress mZygoteSocketAddress;
        final DataInputStream inputStream;

        final BufferedWriter writer;
        private final LocalSocket mZygoteSessionSocket;
        final List<String> abiList;

        final DataInputStream mZygoteInputStream;
        final BufferedWriter mZygoteOutputWriter;


        boolean mClosed;
        private final List<String> mABIList;


        private ZygoteState(LocalSocket socket, DataInputStream inputStream,
        private boolean mClosed;
                BufferedWriter writer, List<String> abiList) {

            this.socket = socket;
        private ZygoteState(LocalSocketAddress zygoteSocketAddress,
            this.inputStream = inputStream;
                            LocalSocket zygoteSessionSocket,
            this.writer = writer;
                            DataInputStream zygoteInputStream,
            this.abiList = abiList;
                            BufferedWriter zygoteOutputWriter,
                            List<String> abiList) {
            this.mZygoteSocketAddress = zygoteSocketAddress;
            this.mZygoteSessionSocket = zygoteSessionSocket;
            this.mZygoteInputStream = zygoteInputStream;
            this.mZygoteOutputWriter = zygoteOutputWriter;
            this.mABIList = abiList;
        }
        }


        public static ZygoteState connect(LocalSocketAddress address) throws IOException {
        /**
         * Create a new ZygoteState object by connecting to the given Zygote socket.
         *
         * @param zygoteSocketAddress  Zygote socket to connect to
         * @return  A new ZygoteState object containing a session socket for the given Zygote socket
         * address
         * @throws IOException
         */
        public static ZygoteState connect(LocalSocketAddress zygoteSocketAddress)
                throws IOException {

            DataInputStream zygoteInputStream = null;
            DataInputStream zygoteInputStream = null;
            BufferedWriter zygoteWriter = null;
            BufferedWriter zygoteOutputWriter = null;
            final LocalSocket zygoteSocket = new LocalSocket();
            final LocalSocket zygoteSessionSocket = new LocalSocket();


            try {
            try {
                zygoteSocket.connect(address);
                zygoteSessionSocket.connect(zygoteSocketAddress);

                zygoteInputStream = new DataInputStream(zygoteSessionSocket.getInputStream());
                zygoteInputStream = new DataInputStream(zygoteSocket.getInputStream());
                zygoteOutputWriter =

                        new BufferedWriter(
                zygoteWriter = new BufferedWriter(new OutputStreamWriter(
                                new OutputStreamWriter(zygoteSessionSocket.getOutputStream()),
                        zygoteSocket.getOutputStream()), 256);
                                256);
            } catch (IOException ex) {
            } catch (IOException ex) {
                try {
                try {
                    zygoteSocket.close();
                    zygoteSessionSocket.close();
                } catch (IOException ignore) {
                } catch (IOException ignore) { }
                }


                throw ex;
                throw ex;
            }
            }


            String abiListString = getAbiList(zygoteWriter, zygoteInputStream);
            return new ZygoteState(zygoteSocketAddress,
            Log.i("Zygote", "Process: zygote socket " + address.getNamespace() + "/"
                                   zygoteSessionSocket, zygoteInputStream, zygoteOutputWriter,
                    + address.getName() + " opened, supported ABIS: " + abiListString);
                                   getAbiList(zygoteOutputWriter, zygoteInputStream));

            return new ZygoteState(zygoteSocket, zygoteInputStream, zygoteWriter,
                    Arrays.asList(abiListString.split(",")));
        }
        }


        boolean matches(String abi) {
        boolean matches(String abi) {
            return abiList.contains(abi);
            return mABIList.contains(abi);
        }
        }


        public void close() {
        public void close() {
            try {
            try {
                socket.close();
                mZygoteSessionSocket.close();
            } catch (IOException ex) {
            } catch (IOException ex) {
                Log.e(LOG_TAG,"I/O exception on routine close", ex);
                Log.e(LOG_TAG,"I/O exception on routine close", ex);
            }
            }
@@ -231,8 +263,8 @@ public class ZygoteProcess {
        try {
        try {
            return startViaZygote(processClass, niceName, uid, gid, gids,
            return startViaZygote(processClass, niceName, uid, gid, gids,
                    runtimeFlags, mountExternal, targetSdkVersion, seInfo,
                    runtimeFlags, mountExternal, targetSdkVersion, seInfo,
                    abi, instructionSet, appDataDir, invokeWith, false /* startChildZygote */,
                    abi, instructionSet, appDataDir, invokeWith,
                    zygoteArgs);
                    /*startChildZygote=*/false, zygoteArgs);
        } catch (ZygoteStartFailedEx ex) {
        } catch (ZygoteStartFailedEx ex) {
            Log.e(LOG_TAG,
            Log.e(LOG_TAG,
                    "Starting VM process through Zygote failed");
                    "Starting VM process through Zygote failed");
@@ -250,7 +282,7 @@ public class ZygoteProcess {
     * @throws ZygoteStartFailedEx if the query failed.
     * @throws ZygoteStartFailedEx if the query failed.
     */
     */
    @GuardedBy("mLock")
    @GuardedBy("mLock")
    private static String getAbiList(BufferedWriter writer, DataInputStream inputStream)
    private static List<String> getAbiList(BufferedWriter writer, DataInputStream inputStream)
            throws IOException {
            throws IOException {
        // Each query starts with the argument count (1 in this case)
        // Each query starts with the argument count (1 in this case)
        writer.write("1");
        writer.write("1");
@@ -266,7 +298,9 @@ public class ZygoteProcess {
        byte[] bytes = new byte[numBytes];
        byte[] bytes = new byte[numBytes];
        inputStream.readFully(bytes);
        inputStream.readFully(bytes);


        return new String(bytes, StandardCharsets.US_ASCII);
        String rawList = new String(bytes, StandardCharsets.US_ASCII);

        return Arrays.asList(rawList.split(","));
    }
    }


    /**
    /**
@@ -300,8 +334,8 @@ public class ZygoteProcess {
             * the child or -1 on failure, followed by boolean to
             * the child or -1 on failure, followed by boolean to
             * indicate whether a wrapper process was used.
             * indicate whether a wrapper process was used.
             */
             */
            final BufferedWriter writer = zygoteState.writer;
            final BufferedWriter writer = zygoteState.mZygoteOutputWriter;
            final DataInputStream inputStream = zygoteState.inputStream;
            final DataInputStream inputStream = zygoteState.mZygoteInputStream;


            writer.write(Integer.toString(args.size()));
            writer.write(Integer.toString(args.size()));
            writer.newLine();
            writer.newLine();
@@ -475,18 +509,18 @@ public class ZygoteProcess {
                ZygoteState state = openZygoteSocketIfNeeded(abi);
                ZygoteState state = openZygoteSocketIfNeeded(abi);


                // Each query starts with the argument count (1 in this case)
                // Each query starts with the argument count (1 in this case)
                state.writer.write("1");
                state.mZygoteOutputWriter.write("1");
                // ... followed by a new-line.
                // ... followed by a new-line.
                state.writer.newLine();
                state.mZygoteOutputWriter.newLine();
                // ... followed by our only argument.
                // ... followed by our only argument.
                state.writer.write("--get-pid");
                state.mZygoteOutputWriter.write("--get-pid");
                state.writer.newLine();
                state.mZygoteOutputWriter.newLine();
                state.writer.flush();
                state.mZygoteOutputWriter.flush();


                // The response is a length prefixed stream of ASCII bytes.
                // The response is a length prefixed stream of ASCII bytes.
                int numBytes = state.inputStream.readInt();
                int numBytes = state.mZygoteInputStream.readInt();
                byte[] bytes = new byte[numBytes];
                byte[] bytes = new byte[numBytes];
                state.inputStream.readFully(bytes);
                state.mZygoteInputStream.readFully(bytes);


                return Integer.parseInt(new String(bytes, StandardCharsets.US_ASCII));
                return Integer.parseInt(new String(bytes, StandardCharsets.US_ASCII));
            }
            }
@@ -540,16 +574,16 @@ public class ZygoteProcess {
            return true;
            return true;
        }
        }
        try {
        try {
            state.writer.write(Integer.toString(mApiBlacklistExemptions.size() + 1));
            state.mZygoteOutputWriter.write(Integer.toString(mApiBlacklistExemptions.size() + 1));
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();
            state.writer.write("--set-api-blacklist-exemptions");
            state.mZygoteOutputWriter.write("--set-api-blacklist-exemptions");
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();
            for (int i = 0; i < mApiBlacklistExemptions.size(); ++i) {
            for (int i = 0; i < mApiBlacklistExemptions.size(); ++i) {
                state.writer.write(mApiBlacklistExemptions.get(i));
                state.mZygoteOutputWriter.write(mApiBlacklistExemptions.get(i));
                state.writer.newLine();
                state.mZygoteOutputWriter.newLine();
            }
            }
            state.writer.flush();
            state.mZygoteOutputWriter.flush();
            int status = state.inputStream.readInt();
            int status = state.mZygoteInputStream.readInt();
            if (status != 0) {
            if (status != 0) {
                Slog.e(LOG_TAG, "Failed to set API blacklist exemptions; status " + status);
                Slog.e(LOG_TAG, "Failed to set API blacklist exemptions; status " + status);
            }
            }
@@ -569,13 +603,13 @@ public class ZygoteProcess {
            return;
            return;
        }
        }
        try {
        try {
            state.writer.write(Integer.toString(1));
            state.mZygoteOutputWriter.write(Integer.toString(1));
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();
            state.writer.write("--hidden-api-log-sampling-rate="
            state.mZygoteOutputWriter.write("--hidden-api-log-sampling-rate="
                    + Integer.toString(mHiddenApiAccessLogSampleRate));
                    + Integer.toString(mHiddenApiAccessLogSampleRate));
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();
            state.writer.flush();
            state.mZygoteOutputWriter.flush();
            int status = state.inputStream.readInt();
            int status = state.mZygoteInputStream.readInt();
            if (status != 0) {
            if (status != 0) {
                Slog.e(LOG_TAG, "Failed to set hidden API log sampling rate; status " + status);
                Slog.e(LOG_TAG, "Failed to set hidden API log sampling rate; status " + status);
            }
            }
@@ -585,22 +619,29 @@ public class ZygoteProcess {
    }
    }


    /**
    /**
     * Tries to open socket to Zygote process if not already open. If
     * Tries to open a session socket to a Zygote process with a compatible ABI if one is not
     * already open, does nothing.  May block and retry.  Requires that mLock be held.
     * already open. If a compatible session socket is already open that session socket is returned.
     * This function may block and may have to try connecting to multiple Zygotes to find the
     * appropriate one.  Requires that mLock be held.
     */
     */
    @GuardedBy("mLock")
    @GuardedBy("mLock")
    private ZygoteState openZygoteSocketIfNeeded(String abi) throws ZygoteStartFailedEx {
    private ZygoteState openZygoteSocketIfNeeded(String abi)
            throws ZygoteStartFailedEx {

        Preconditions.checkState(Thread.holdsLock(mLock), "ZygoteProcess lock not held");
        Preconditions.checkState(Thread.holdsLock(mLock), "ZygoteProcess lock not held");


        if (primaryZygoteState == null || primaryZygoteState.isClosed()) {
        if (primaryZygoteState == null || primaryZygoteState.isClosed()) {
            try {
            try {
                primaryZygoteState = ZygoteState.connect(mSocket);
                primaryZygoteState =
                    ZygoteState.connect(mZygoteSocketAddress);
            } catch (IOException ioe) {
            } catch (IOException ioe) {
                throw new ZygoteStartFailedEx("Error connecting to primary zygote", ioe);
                throw new ZygoteStartFailedEx("Error connecting to primary zygote", ioe);
            }
            }

            maybeSetApiBlacklistExemptions(primaryZygoteState, false);
            maybeSetApiBlacklistExemptions(primaryZygoteState, false);
            maybeSetHiddenApiAccessLogSampleRate(primaryZygoteState);
            maybeSetHiddenApiAccessLogSampleRate(primaryZygoteState);
        }
        }

        if (primaryZygoteState.matches(abi)) {
        if (primaryZygoteState.matches(abi)) {
            return primaryZygoteState;
            return primaryZygoteState;
        }
        }
@@ -608,10 +649,12 @@ public class ZygoteProcess {
        // The primary zygote didn't match. Try the secondary.
        // The primary zygote didn't match. Try the secondary.
        if (secondaryZygoteState == null || secondaryZygoteState.isClosed()) {
        if (secondaryZygoteState == null || secondaryZygoteState.isClosed()) {
            try {
            try {
                secondaryZygoteState = ZygoteState.connect(mSecondarySocket);
                secondaryZygoteState =
                    ZygoteState.connect(mZygoteSecondarySocketAddress);
            } catch (IOException ioe) {
            } catch (IOException ioe) {
                throw new ZygoteStartFailedEx("Error connecting to secondary zygote", ioe);
                throw new ZygoteStartFailedEx("Error connecting to secondary zygote", ioe);
            }
            }

            maybeSetApiBlacklistExemptions(secondaryZygoteState, false);
            maybeSetApiBlacklistExemptions(secondaryZygoteState, false);
            maybeSetHiddenApiAccessLogSampleRate(secondaryZygoteState);
            maybeSetHiddenApiAccessLogSampleRate(secondaryZygoteState);
        }
        }
@@ -632,27 +675,27 @@ public class ZygoteProcess {
                                                                            IOException {
                                                                            IOException {
        synchronized(mLock) {
        synchronized(mLock) {
            ZygoteState state = openZygoteSocketIfNeeded(abi);
            ZygoteState state = openZygoteSocketIfNeeded(abi);
            state.writer.write("5");
            state.mZygoteOutputWriter.write("5");
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();


            state.writer.write("--preload-package");
            state.mZygoteOutputWriter.write("--preload-package");
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();


            state.writer.write(packagePath);
            state.mZygoteOutputWriter.write(packagePath);
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();


            state.writer.write(libsPath);
            state.mZygoteOutputWriter.write(libsPath);
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();


            state.writer.write(libFileName);
            state.mZygoteOutputWriter.write(libFileName);
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();


            state.writer.write(cacheKey);
            state.mZygoteOutputWriter.write(cacheKey);
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();


            state.writer.flush();
            state.mZygoteOutputWriter.flush();


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


@@ -666,13 +709,13 @@ public class ZygoteProcess {
        synchronized (mLock) {
        synchronized (mLock) {
            ZygoteState state = openZygoteSocketIfNeeded(abi);
            ZygoteState state = openZygoteSocketIfNeeded(abi);
            // Each query starts with the argument count (1 in this case)
            // Each query starts with the argument count (1 in this case)
            state.writer.write("1");
            state.mZygoteOutputWriter.write("1");
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();
            state.writer.write("--preload-default");
            state.mZygoteOutputWriter.write("--preload-default");
            state.writer.newLine();
            state.mZygoteOutputWriter.newLine();
            state.writer.flush();
            state.mZygoteOutputWriter.flush();


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


@@ -680,20 +723,21 @@ public class ZygoteProcess {
     * Try connecting to the Zygote over and over again until we hit a time-out.
     * Try connecting to the Zygote over and over again until we hit a time-out.
     * @param socketName The name of the socket to connect to.
     * @param socketName The name of the socket to connect to.
     */
     */
    public static void waitForConnectionToZygote(String socketName) {
    public static void waitForConnectionToZygote(String zygoteSocketName) {
        final LocalSocketAddress address =
        final LocalSocketAddress zygoteSocketAddress =
                new LocalSocketAddress(socketName, LocalSocketAddress.Namespace.RESERVED);
                new LocalSocketAddress(zygoteSocketName, LocalSocketAddress.Namespace.RESERVED);
        waitForConnectionToZygote(address);
        waitForConnectionToZygote(zygoteSocketAddress);
    }
    }


    /**
    /**
     * Try connecting to the Zygote over and over again until we hit a time-out.
     * Try connecting to the Zygote over and over again until we hit a time-out.
     * @param address The name of the socket to connect to.
     * @param address The name of the socket to connect to.
     */
     */
    public static void waitForConnectionToZygote(LocalSocketAddress address) {
    public static void waitForConnectionToZygote(LocalSocketAddress zygoteSocketAddress) {
        for (int n = 20; n >= 0; n--) {
        for (int n = 20; n >= 0; n--) {
            try {
            try {
                final ZygoteState zs = ZygoteState.connect(address);
                final ZygoteState zs =
                        ZygoteState.connect(zygoteSocketAddress);
                zs.close();
                zs.close();
                return;
                return;
            } catch (IOException ioe) {
            } catch (IOException ioe) {
@@ -706,7 +750,8 @@ public class ZygoteProcess {
            } catch (InterruptedException ie) {
            } catch (InterruptedException ie) {
            }
            }
        }
        }
        Slog.wtf(LOG_TAG, "Failed to connect to Zygote through socket " + address.getName());
        Slog.wtf(LOG_TAG, "Failed to connect to Zygote through socket "
                + zygoteSocketAddress.getName());
    }
    }


    /**
    /**
+1 −1
Original line number Original line Diff line number Diff line
@@ -150,7 +150,7 @@ public class WebViewZygote {
        }
        }


        try {
        try {
            sZygote = Process.zygoteProcess.startChildZygote(
            sZygote = Process.ZYGOTE_PROCESS.startChildZygote(
                    "com.android.internal.os.WebViewZygoteInit",
                    "com.android.internal.os.WebViewZygoteInit",
                    "webview_zygote",
                    "webview_zygote",
                    Process.WEBVIEW_ZYGOTE_UID,
                    Process.WEBVIEW_ZYGOTE_UID,
+0 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.internal.os;


import android.app.ApplicationLoaders;
import android.app.ApplicationLoaders;
import android.net.LocalSocket;
import android.net.LocalSocket;
import android.net.LocalServerSocket;
import android.os.Build;
import android.os.Build;
import android.system.ErrnoException;
import android.system.ErrnoException;
import android.system.Os;
import android.system.Os;
+2 −3
Original line number Original line Diff line number Diff line
@@ -21,7 +21,6 @@ import static android.system.OsConstants.S_IRWXO;


import android.content.res.Resources;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.TypedArray;
import android.opengl.EGL14;
import android.os.Build;
import android.os.Build;
import android.os.Environment;
import android.os.Environment;
import android.os.IInstalld;
import android.os.IInstalld;
@@ -853,8 +852,8 @@ public class ZygoteInit {
    }
    }


    private static void waitForSecondaryZygote(String socketName) {
    private static void waitForSecondaryZygote(String socketName) {
        String otherZygoteName = Process.ZYGOTE_SOCKET.equals(socketName) ?
        String otherZygoteName = ZygoteProcess.ZYGOTE_SOCKET_NAME.equals(socketName)
                Process.SECONDARY_ZYGOTE_SOCKET : Process.ZYGOTE_SOCKET;
                ? ZygoteProcess.ZYGOTE_SECONDARY_SOCKET_NAME : ZygoteProcess.ZYGOTE_SOCKET_NAME;
        ZygoteProcess.waitForConnectionToZygote(otherZygoteName);
        ZygoteProcess.waitForConnectionToZygote(otherZygoteName);
    }
    }


Loading