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

Commit ce275541 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "ServiceManager: Check guaranteeClient before unregistering services"...

Merge "ServiceManager: Check guaranteeClient before unregistering services" am: cbe95392 am: 76eb4acf

Change-Id: I0b80ce90ba9441335387673fbcddd9f9772f5fa3
parents f09ba0ec 76eb4acf
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -522,6 +522,11 @@ Status ServiceManager::tryUnregisterService(const std::string& name, const sp<IB
        return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE);
        return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE);
    }
    }


    if (serviceIt->second.guaranteeClient) {
        LOG(INFO) << "Tried to unregister " << name << ", but there is about to be a client.";
        return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE);
    }

    int clients = handleServiceClientCallback(name, false);
    int clients = handleServiceClientCallback(name, false);


    // clients < 0: feature not implemented or other error. Assume clients.
    // clients < 0: feature not implemented or other error. Assume clients.