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

Commit 8dc97546 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

Merge "ServiceManager: Check guaranteeClient before unregistering services" into rvc-dev am: edbc86de am: 29e0fc67 am: 49196b30

Change-Id: I079a325aab292db3ef41b549a2bc8a1fa1e67b63
parents 417fd3a1 49196b30
Loading
Loading
Loading
Loading
+5 −0
Original line number 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);
    }

    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);

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