Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4abf02bc authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Migrate from android::String isEmpty to empty [process]" into main am: 846d6a30

parents e71d0718 846d6a30
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -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.
        }
        }


@@ -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();
@@ -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.
        //
        //
@@ -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");
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 */);
    }
    }
}
}