Loading cmds/app_process/app_main.cpp +5 −5 Original line number Original line Diff line number Diff line Loading @@ -49,7 +49,7 @@ public: virtual void onVmCreated(JNIEnv* env) virtual void onVmCreated(JNIEnv* env) { { if (mClassName.isEmpty()) { if (mClassName.empty()) { return; // Zygote. Nothing to do here. return; // Zygote. Nothing to do here. } } Loading Loading @@ -98,7 +98,7 @@ public: virtual void onExit(int code) virtual void onExit(int code) { { if (mClassName.isEmpty()) { if (mClassName.empty()) { // if zygote // if zygote IPCThreadState::self()->stopProcess(); IPCThreadState::self()->stopProcess(); hardware::IPCThreadState::self()->stopProcess(); hardware::IPCThreadState::self()->stopProcess(); Loading Loading @@ -282,7 +282,7 @@ int main(int argc, char* const argv[]) } } Vector<String8> args; Vector<String8> args; if (!className.isEmpty()) { if (!className.empty()) { // We're not in zygote mode, the only argument we need to pass // We're not in zygote mode, the only argument we need to pass // to RuntimeInit is the application argument. // to RuntimeInit is the application argument. // // Loading Loading @@ -328,13 +328,13 @@ int main(int argc, char* const argv[]) } } } } if (!niceName.isEmpty()) { if (!niceName.empty()) { runtime.setArgv0(niceName.string(), true /* setProcName */); runtime.setArgv0(niceName.string(), true /* setProcName */); } } if (zygote) { if (zygote) { runtime.start("com.android.internal.os.ZygoteInit", args, 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); runtime.start("com.android.internal.os.RuntimeInit", args, zygote); } else { } else { fprintf(stderr, "Error: no class name or --zygote supplied.\n"); fprintf(stderr, "Error: no class name or --zygote supplied.\n"); Loading core/jni/android_util_Process.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -583,7 +583,7 @@ void android_os_Process_setArgV0(JNIEnv* env, jobject clazz, jstring name) env->ReleaseStringCritical(name, str); env->ReleaseStringCritical(name, str); } } if (!name8.isEmpty()) { if (!name8.empty()) { AndroidRuntime::getRuntime()->setArgv0(name8.string(), true /* setProcName */); AndroidRuntime::getRuntime()->setArgv0(name8.string(), true /* setProcName */); } } } } Loading Loading
cmds/app_process/app_main.cpp +5 −5 Original line number Original line Diff line number Diff line Loading @@ -49,7 +49,7 @@ public: virtual void onVmCreated(JNIEnv* env) virtual void onVmCreated(JNIEnv* env) { { if (mClassName.isEmpty()) { if (mClassName.empty()) { return; // Zygote. Nothing to do here. return; // Zygote. Nothing to do here. } } Loading Loading @@ -98,7 +98,7 @@ public: virtual void onExit(int code) virtual void onExit(int code) { { if (mClassName.isEmpty()) { if (mClassName.empty()) { // if zygote // if zygote IPCThreadState::self()->stopProcess(); IPCThreadState::self()->stopProcess(); hardware::IPCThreadState::self()->stopProcess(); hardware::IPCThreadState::self()->stopProcess(); Loading Loading @@ -282,7 +282,7 @@ int main(int argc, char* const argv[]) } } Vector<String8> args; Vector<String8> args; if (!className.isEmpty()) { if (!className.empty()) { // We're not in zygote mode, the only argument we need to pass // We're not in zygote mode, the only argument we need to pass // to RuntimeInit is the application argument. // to RuntimeInit is the application argument. // // Loading Loading @@ -328,13 +328,13 @@ int main(int argc, char* const argv[]) } } } } if (!niceName.isEmpty()) { if (!niceName.empty()) { runtime.setArgv0(niceName.string(), true /* setProcName */); runtime.setArgv0(niceName.string(), true /* setProcName */); } } if (zygote) { if (zygote) { runtime.start("com.android.internal.os.ZygoteInit", args, 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); runtime.start("com.android.internal.os.RuntimeInit", args, zygote); } else { } else { fprintf(stderr, "Error: no class name or --zygote supplied.\n"); fprintf(stderr, "Error: no class name or --zygote supplied.\n"); Loading
core/jni/android_util_Process.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -583,7 +583,7 @@ void android_os_Process_setArgV0(JNIEnv* env, jobject clazz, jstring name) env->ReleaseStringCritical(name, str); env->ReleaseStringCritical(name, str); } } if (!name8.isEmpty()) { if (!name8.empty()) { AndroidRuntime::getRuntime()->setArgv0(name8.string(), true /* setProcName */); AndroidRuntime::getRuntime()->setArgv0(name8.string(), true /* setProcName */); } } } } Loading