diff options
| author | Nicolas Geoffray <ngeoffray@google.com> | 2017-09-13 08:08:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-13 08:08:47 +0000 |
| commit | e017dae5873cecf2a42f4e2709680c44fc287c88 (patch) | |
| tree | 32c4f3b3552e85c9cbab26416e44184415ea9372 /core/java/android | |
| parent | 7b625191e2d58ba391b413a068fe6867e9e325ea (diff) | |
| parent | 81edac40374b1d3203f7adac32e299147db7eba2 (diff) | |
Merge "Rename debugFlags to runtimeFlags."
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/os/Process.java | 14 | ||||
| -rw-r--r-- | core/java/android/os/ZygoteProcess.java | 42 |
2 files changed, 16 insertions, 40 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index ae0b88573e8f..c45eb2e4ac39 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -19,8 +19,8 @@ package android.os; import android.annotation.TestApi; import android.system.Os; import android.system.OsConstants; -import android.util.Log; import android.webkit.WebViewZygote; + import dalvik.system.VMRuntime; /** @@ -417,7 +417,7 @@ public class Process { * * When invokeWith is not null, the process will be started as a fresh app * and not a zygote fork. Note that this is only allowed for uid 0 or when - * debugFlags contains DEBUG_ENABLE_DEBUGGER. + * runtimeFlags contains DEBUG_ENABLE_DEBUGGER. * * @param processClass The class to use as the process's main entry * point. @@ -425,7 +425,7 @@ public class Process { * @param uid The user-id under which the process will run. * @param gid The group-id under which the process will run. * @param gids Additional group-ids associated with the process. - * @param debugFlags Additional flags. + * @param runtimeFlags Additional flags for the runtime. * @param targetSdkVersion The target SDK version for the app. * @param seInfo null-ok SELinux information for the new process. * @param abi non-null the ABI this app should be started with. @@ -442,7 +442,7 @@ public class Process { public static final ProcessStartResult start(final String processClass, final String niceName, int uid, int gid, int[] gids, - int debugFlags, int mountExternal, + int runtimeFlags, int mountExternal, int targetSdkVersion, String seInfo, String abi, @@ -451,7 +451,7 @@ public class Process { String invokeWith, String[] zygoteArgs) { return zygoteProcess.start(processClass, niceName, uid, gid, gids, - debugFlags, mountExternal, targetSdkVersion, seInfo, + runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, zygoteArgs); } @@ -459,7 +459,7 @@ public class Process { public static final ProcessStartResult startWebView(final String processClass, final String niceName, int uid, int gid, int[] gids, - int debugFlags, int mountExternal, + int runtimeFlags, int mountExternal, int targetSdkVersion, String seInfo, String abi, @@ -468,7 +468,7 @@ public class Process { String invokeWith, String[] zygoteArgs) { return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids, - debugFlags, mountExternal, targetSdkVersion, seInfo, + runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, zygoteArgs); } diff --git a/core/java/android/os/ZygoteProcess.java b/core/java/android/os/ZygoteProcess.java index 8208438dc62a..70452006da27 100644 --- a/core/java/android/os/ZygoteProcess.java +++ b/core/java/android/os/ZygoteProcess.java @@ -19,9 +19,11 @@ package android.os; import android.net.LocalSocket; import android.net.LocalSocketAddress; import android.util.Log; + import com.android.internal.annotations.GuardedBy; import com.android.internal.os.Zygote; import com.android.internal.util.Preconditions; + import java.io.BufferedWriter; import java.io.DataInputStream; import java.io.IOException; @@ -172,7 +174,7 @@ public class ZygoteProcess { * * When invokeWith is not null, the process will be started as a fresh app * and not a zygote fork. Note that this is only allowed for uid 0 or when - * debugFlags contains DEBUG_ENABLE_DEBUGGER. + * runtimeFlags contains DEBUG_ENABLE_DEBUGGER. * * @param processClass The class to use as the process's main entry * point. @@ -180,7 +182,7 @@ public class ZygoteProcess { * @param uid The user-id under which the process will run. * @param gid The group-id under which the process will run. * @param gids Additional group-ids associated with the process. - * @param debugFlags Additional flags. + * @param runtimeFlags Additional flags. * @param targetSdkVersion The target SDK version for the app. * @param seInfo null-ok SELinux information for the new process. * @param abi non-null the ABI this app should be started with. @@ -195,7 +197,7 @@ public class ZygoteProcess { public final Process.ProcessStartResult start(final String processClass, final String niceName, int uid, int gid, int[] gids, - int debugFlags, int mountExternal, + int runtimeFlags, int mountExternal, int targetSdkVersion, String seInfo, String abi, @@ -205,7 +207,7 @@ public class ZygoteProcess { String[] zygoteArgs) { try { return startViaZygote(processClass, niceName, uid, gid, gids, - debugFlags, mountExternal, targetSdkVersion, seInfo, + runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, zygoteArgs); } catch (ZygoteStartFailedEx ex) { Log.e(LOG_TAG, @@ -316,7 +318,7 @@ public class ZygoteProcess { * @param gid a POSIX gid that the new process shuold setgid() to * @param gids null-ok; a list of supplementary group IDs that the * new process should setgroup() to. - * @param debugFlags Additional flags. + * @param runtimeFlags Additional flags for the runtime. * @param targetSdkVersion The target SDK version for the app. * @param seInfo null-ok SELinux information for the new process. * @param abi the ABI the process should use. @@ -330,7 +332,7 @@ public class ZygoteProcess { final String niceName, final int uid, final int gid, final int[] gids, - int debugFlags, int mountExternal, + int runtimeFlags, int mountExternal, int targetSdkVersion, String seInfo, String abi, @@ -346,33 +348,7 @@ public class ZygoteProcess { argsForZygote.add("--runtime-args"); argsForZygote.add("--setuid=" + uid); argsForZygote.add("--setgid=" + gid); - if ((debugFlags & Zygote.DEBUG_ENABLE_JNI_LOGGING) != 0) { - argsForZygote.add("--enable-jni-logging"); - } - if ((debugFlags & Zygote.DEBUG_ENABLE_SAFEMODE) != 0) { - argsForZygote.add("--enable-safemode"); - } - if ((debugFlags & Zygote.DEBUG_ENABLE_JDWP) != 0) { - argsForZygote.add("--enable-jdwp"); - } - if ((debugFlags & Zygote.DEBUG_ENABLE_CHECKJNI) != 0) { - argsForZygote.add("--enable-checkjni"); - } - if ((debugFlags & Zygote.DEBUG_GENERATE_DEBUG_INFO) != 0) { - argsForZygote.add("--generate-debug-info"); - } - if ((debugFlags & Zygote.DEBUG_ALWAYS_JIT) != 0) { - argsForZygote.add("--always-jit"); - } - if ((debugFlags & Zygote.DEBUG_NATIVE_DEBUGGABLE) != 0) { - argsForZygote.add("--native-debuggable"); - } - if ((debugFlags & Zygote.DEBUG_JAVA_DEBUGGABLE) != 0) { - argsForZygote.add("--java-debuggable"); - } - if ((debugFlags & Zygote.DEBUG_ENABLE_ASSERT) != 0) { - argsForZygote.add("--enable-assert"); - } + argsForZygote.add("--runtime-flags=" + runtimeFlags); if (mountExternal == Zygote.MOUNT_EXTERNAL_DEFAULT) { argsForZygote.add("--mount-external-default"); } else if (mountExternal == Zygote.MOUNT_EXTERNAL_READ) { |
