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

Commit d7b72086 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Define out the hwbinder death notifier code for libgui"

parents 23e195c2 3248ea00
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -288,10 +288,12 @@ Return<void> B2HGraphicBufferProducer::connect(
                               &bOutput),
                &hStatus) &&
            b2h(bOutput, &hOutput);
    if (converted) {
#ifdef NO_BINDER
    if (converted && hListener != nullptr) {
        mObituary = new Obituary(this, hListener, hConnectionType);
        hListener->linkToDeath(mObituary, 0);
    }
#endif // NO_BINDER
    _hidl_cb(converted ? hStatus : HStatus::UNKNOWN_ERROR, hOutput);
    return {};
}
@@ -304,10 +306,12 @@ Return<HStatus> B2HGraphicBufferProducer::disconnect(
    }
    HStatus hStatus{};
    bool converted = b2h(mBase->disconnect(bConnectionType), &hStatus);
#ifdef NO_BINDER
    if (mObituary != nullptr) {
        mObituary->listener->unlinkToDeath(mObituary);
        mObituary.clear();
    }
#endif // NO_BINDER
    return {converted ? hStatus : HStatus::UNKNOWN_ERROR};
}