diff options
author | Sebastien Hertz <shertz@google.com> | 2015-08-10 18:55:34 +0200 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-19 00:12:33 +0200 |
commit | e510155dbdebb50048632810b1735d69f9e72638 (patch) | |
tree | 068adab1d5aba8f3eb4132d8ff7004a34a9292f0 /cmds | |
parent | 38add157784a2bb5ddb13558573ece99229bb3b0 (diff) | |
download | frameworks_base-e510155dbdebb50048632810b1735d69f9e72638.zip frameworks_base-e510155dbdebb50048632810b1735d69f9e72638.tar.gz frameworks_base-e510155dbdebb50048632810b1735d69f9e72638.tar.bz2 |
When starting the runtime from app_process, we only pass JDWP options
if starting zygote. It prevents from opening a JDWP connection in
non-zygote programs while Android apps (forked from zygote) remain
debuggable.
Bug: 23050463
(cherry picked from commit 7a09b8322cab26d6e3da1362d3c74964ae66b5d4)
Change-Id: Ib5b6d3bc4d45389993c3c54226df5a7b72479d19
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/app_process/app_main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 6fe358c..324c1d2 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -187,14 +187,16 @@ int main(int argc, const char* const argv[]) if (zygote) { runtime.start("com.android.internal.os.ZygoteInit", - startSystemServer ? "start-system-server" : ""); + startSystemServer ? "start-system-server" : "", + zygote); } else if (className) { // Remainder of args get passed to startup class main() runtime.mClassName = className; runtime.mArgC = argc - i; runtime.mArgV = argv + i; runtime.start("com.android.internal.os.RuntimeInit", - application ? "application" : "tool"); + application ? "application" : "tool", + zygote); } else { fprintf(stderr, "Error: no class name or --zygote supplied.\n"); app_usage(); |