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

Commit ebc57c74 authored by Narayan Kamath's avatar Narayan Kamath Committed by android-build-merger
Browse files

Merge "Choose the right executable for wrapped applications." automerge: aa87e89e

automerge: 4af0265a

* commit '4af0265a':
  Choose the right executable for wrapped applications.
parents 748e813e 4af0265a
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.internal.os;
import android.os.Process;
import android.util.Slog;

import dalvik.system.VMRuntime;
import java.io.DataOutputStream;
import java.io.FileDescriptor;
import java.io.FileOutputStream;
@@ -96,9 +97,20 @@ public class WrapperInit {
     * @param args Arguments for {@link RuntimeInit#main}.
     */
    public static void execApplication(String invokeWith, String niceName,
            int targetSdkVersion, FileDescriptor pipeFd, String[] args) {
            int targetSdkVersion, String instructionSet, FileDescriptor pipeFd,
            String[] args) {
        StringBuilder command = new StringBuilder(invokeWith);
        command.append(" /system/bin/app_process /system/bin --application");

        final String appProcess;
        if (VMRuntime.is64BitInstructionSet(instructionSet)) {
            appProcess = "/system/bin/app_process64";
        } else {
            appProcess = "/system/bin/app_process32";
        }
        command.append(' ');
        command.append(appProcess);

        command.append(" /system/bin --application");
        if (niceName != null) {
            command.append(" '--nice-name=").append(niceName).append("'");
        }
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.system.ErrnoException;
import android.system.Os;
import android.util.Log;
import dalvik.system.PathClassLoader;
import dalvik.system.VMRuntime;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -858,6 +859,7 @@ class ZygoteConnection {
        if (parsedArgs.invokeWith != null) {
            WrapperInit.execApplication(parsedArgs.invokeWith,
                    parsedArgs.niceName, parsedArgs.targetSdkVersion,
                    VMRuntime.getCurrentInstructionSet(),
                    pipeFd, parsedArgs.remainingArgs);
        } else {
            RuntimeInit.zygoteInit(parsedArgs.targetSdkVersion,
+1 −1
Original line number Diff line number Diff line
@@ -437,7 +437,7 @@ public class ZygoteInit {

            WrapperInit.execApplication(parsedArgs.invokeWith,
                    parsedArgs.niceName, parsedArgs.targetSdkVersion,
                    null, args);
                    VMRuntime.getCurrentInstructionSet(), null, args);
        } else {
            ClassLoader cl = null;
            if (systemServerClasspath != null) {