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

Commit 1e2ba929 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder: avoid re-registering callback

This code assumes that it is only registered once, and so in some cases,
the service wasn't shutting down.

Bug: 140310064
Test: aidl_lazy_test
Change-Id: I19474e105b4c4b3669499ac71c8cf22b67a0176b
parent e5c824b2
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -82,12 +82,12 @@ bool ClientCounterCallback::registerService(const sp<IBinder>& service, const st
        return false;
    }

    if (!reRegister) {
        if (!manager->registerClientCallback(name, service, this).isOk()) {
            ALOGE("Failed to add client callback for service %s", name.c_str());
            return false;
        }

    if (!reRegister) {
        // Only add this when a service is added for the first time, as it is not removed
        mRegisteredServices[name] = {service, allowIsolated, dumpFlags};
    }