app_process: Fix className check

Emptyness of a String8 variable was not checked correctly.
As a result, even when no arguments were provided,
`app_process` was still launching runtime.

Test: adb shell app_process64
Change-Id: Ia303edb5a74b61efad24b475008a3642a07ab789
This commit is contained in:
Mikhail Naganov
2022-08-24 19:54:48 +00:00
parent b09fa7a106
commit b523e5e6dc

View File

@@ -334,7 +334,7 @@ int main(int argc, char* const argv[])
if (zygote) {
runtime.start("com.android.internal.os.ZygoteInit", args, zygote);
} else if (className) {
} else if (!className.isEmpty()) {
runtime.start("com.android.internal.os.RuntimeInit", args, zygote);
} else {
fprintf(stderr, "Error: no class name or --zygote supplied.\n");