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
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index 12083b6..28db61f 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -334,7 +334,7 @@
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");