Merge "Fix a couple of issues with system_server forking."
This commit is contained in:
@@ -399,7 +399,7 @@ class ZygoteConnection {
|
|||||||
throws IllegalArgumentException {
|
throws IllegalArgumentException {
|
||||||
int curArg = 0;
|
int curArg = 0;
|
||||||
|
|
||||||
boolean seenRuntimeArgs = true;
|
boolean seenRuntimeArgs = false;
|
||||||
|
|
||||||
for ( /* curArg */ ; curArg < args.length; curArg++) {
|
for ( /* curArg */ ; curArg < args.length; curArg++) {
|
||||||
String arg = args[curArg];
|
String arg = args[curArg];
|
||||||
@@ -533,14 +533,18 @@ class ZygoteConnection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!seenRuntimeArgs) {
|
if (abiListQuery) {
|
||||||
throw new IllegalArgumentException("Unexpected argument : " + args[curArg]);
|
if (args.length - curArg > 0) {
|
||||||
|
throw new IllegalArgumentException("Unexpected arguments after --query-abi-list.");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!seenRuntimeArgs) {
|
||||||
|
throw new IllegalArgumentException("Unexpected argument : " + args[curArg]);
|
||||||
|
}
|
||||||
|
|
||||||
|
remainingArgs = new String[args.length - curArg];
|
||||||
|
System.arraycopy(args, curArg, remainingArgs, 0, remainingArgs.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
remainingArgs = new String[args.length - curArg];
|
|
||||||
|
|
||||||
System.arraycopy(args, curArg, remainingArgs, 0,
|
|
||||||
remainingArgs.length);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -504,8 +504,8 @@ public class ZygoteInit {
|
|||||||
"--setgid=1000",
|
"--setgid=1000",
|
||||||
"--setgroups=1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1018,1032,3001,3002,3003,3006,3007",
|
"--setgroups=1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1018,1032,3001,3002,3003,3006,3007",
|
||||||
"--capabilities=" + capabilities + "," + capabilities,
|
"--capabilities=" + capabilities + "," + capabilities,
|
||||||
"--runtime-init",
|
|
||||||
"--nice-name=system_server",
|
"--nice-name=system_server",
|
||||||
|
"--runtime-args",
|
||||||
"com.android.server.SystemServer",
|
"com.android.server.SystemServer",
|
||||||
};
|
};
|
||||||
ZygoteConnection.Arguments parsedArgs = null;
|
ZygoteConnection.Arguments parsedArgs = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user