Mark some libs as double_loadable
Following libs are explicitly marked as double_loadable since they are
one of the (indirect) dependencies of LLNDK libraries and at the same
time they themselves are marked as VNDK. Such lib can be double loaded
inside a vendor process.
* libgui and libbinder: due to indirect dependency from libmediandk via
libmediaomx. libmediandk is LLNDK)
* libui: due to dependency from libnativewindow, which is LLNDK.
Also, dependencies from libui and libgui to libpdx_default_transport and
libbufferhubque are cut when building libui and libgui for vendors. This
is primarily to exclude libpdx* and libbufferhubqueue from VNDK and
secondly not to mark transitive dependencies of the libs (such as
libcrypto) as double_loadable.
Note: even without this change, the library is already capable of being
double loaded due to the dependency chain towards it. This change is to
make it explicit so that double loading of a library is carefully
tracked and signed-off by the owner of the lib.
Bug: 77155589
Test: m -j
Change-Id: Id4768162aeb72b71d63d7e4498980f276ef58e6b
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index 2917f45..a8da134 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -18,8 +18,11 @@
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
//#define LOG_NDEBUG 0
+#ifndef NO_BUFFERHUB
#include <gui/BufferHubConsumer.h>
#include <gui/BufferHubProducer.h>
+#endif
+
#include <gui/BufferQueue.h>
#include <gui/BufferQueueConsumer.h>
#include <gui/BufferQueueCore.h>
@@ -103,6 +106,7 @@
*outConsumer = consumer;
}
+#ifndef NO_BUFFERHUB
void BufferQueue::createBufferHubQueue(sp<IGraphicBufferProducer>* outProducer,
sp<IGraphicBufferConsumer>* outConsumer) {
LOG_ALWAYS_FATAL_IF(outProducer == NULL, "BufferQueue: outProducer must not be NULL");
@@ -128,5 +132,6 @@
*outProducer = producer;
*outConsumer = consumer;
}
+#endif
}; // namespace android