diff options
author | 2022-08-24 19:54:48 +0000 | |
---|---|---|
committer | 2022-08-24 19:54:48 +0000 | |
commit | b523e5e6dcd85f180650d1e812f3d98863b42d8c (patch) | |
tree | 188093a51d88df69d5a9e716db37e3dd9273597b | |
parent | b09fa7a10668b3e157a3d0a52314820f458d8718 (diff) |
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
-rw-r--r-- | cmds/app_process/app_main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 12083b6fe20b..28db61f7d98a 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -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"); |