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

Commit df4eca51 authored by Iliyan Malchev's avatar Iliyan Malchev Committed by android-build-merger
Browse files

Merge "binder: allow repeated invocations of initWithDriver" into oc-dev

am: 11c1acc3

Change-Id: I44a4f3cb656c12eba9f506a5cb1299ca3faa985c
parents 320721f8 11c1acc3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -79,6 +79,11 @@ sp<ProcessState> ProcessState::initWithDriver(const char* driver)
{
    Mutex::Autolock _l(gProcessMutex);
    if (gProcess != NULL) {
        // Allow for initWithDriver to be called repeatedly with the same
        // driver.
        if (!strcmp(gProcess->getDriverName().c_str(), driver)) {
            return gProcess;
        }
        LOG_ALWAYS_FATAL("ProcessState was already initialized.");
    }
    gProcess = new ProcessState(driver);