Define out the hwbinder death notifier code for libgui

This code is only needed for the NO_BINDER version of
libgui (libgui_bufferqueue_static). For libgui, the notifier
is linked inside the connect/disconnect call of BufferQueue
itself.

bug: 149345887
test: Android Auto team helped test it on Auto devices to fix the bug.
Change-Id: I29ab83b9119729e3b878ace439086e87d9c585f6
diff --git a/libs/gui/bufferqueue/2.0/B2HGraphicBufferProducer.cpp b/libs/gui/bufferqueue/2.0/B2HGraphicBufferProducer.cpp
index 0f3ae2e..c76d771 100644
--- a/libs/gui/bufferqueue/2.0/B2HGraphicBufferProducer.cpp
+++ b/libs/gui/bufferqueue/2.0/B2HGraphicBufferProducer.cpp
@@ -288,10 +288,12 @@
                                &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 @@
     }
     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};
 }