diff options
author | 2023-08-28 10:16:49 +0000 | |
---|---|---|
committer | 2023-08-28 10:16:49 +0000 | |
commit | 846d6a30bc9e84662743d65337281d3d83cc2ad8 (patch) | |
tree | cb51c2cfa05ca556045ceec67758602389ece47c | |
parent | cd4aae5f6d79836fef7a0653b3b53edb4304108e (diff) | |
parent | 5c0887b8f1c5c535b861441a372ca1b4d7e9f614 (diff) |
Merge "Migrate from android::String isEmpty to empty [process]" into main
-rw-r--r-- | cmds/app_process/app_main.cpp | 10 | ||||
-rw-r--r-- | core/jni/android_util_Process.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 28db61f7d98a..66248128ff29 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -49,7 +49,7 @@ public: virtual void onVmCreated(JNIEnv* env) { - if (mClassName.isEmpty()) { + if (mClassName.empty()) { return; // Zygote. Nothing to do here. } @@ -98,7 +98,7 @@ public: virtual void onExit(int code) { - if (mClassName.isEmpty()) { + if (mClassName.empty()) { // if zygote IPCThreadState::self()->stopProcess(); hardware::IPCThreadState::self()->stopProcess(); @@ -282,7 +282,7 @@ int main(int argc, char* const argv[]) } Vector<String8> args; - if (!className.isEmpty()) { + if (!className.empty()) { // We're not in zygote mode, the only argument we need to pass // to RuntimeInit is the application argument. // @@ -328,13 +328,13 @@ int main(int argc, char* const argv[]) } } - if (!niceName.isEmpty()) { + if (!niceName.empty()) { runtime.setArgv0(niceName.string(), true /* setProcName */); } if (zygote) { runtime.start("com.android.internal.os.ZygoteInit", args, zygote); - } else if (!className.isEmpty()) { + } else if (!className.empty()) { runtime.start("com.android.internal.os.RuntimeInit", args, zygote); } else { fprintf(stderr, "Error: no class name or --zygote supplied.\n"); diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp index b9d5ee4b3015..e9dd75b28fbd 100644 --- a/core/jni/android_util_Process.cpp +++ b/core/jni/android_util_Process.cpp @@ -583,7 +583,7 @@ void android_os_Process_setArgV0(JNIEnv* env, jobject clazz, jstring name) env->ReleaseStringCritical(name, str); } - if (!name8.isEmpty()) { + if (!name8.empty()) { AndroidRuntime::getRuntime()->setArgv0(name8.string(), true /* setProcName */); } } |