summaryrefslogtreecommitdiff
path: root/libs/binder/Debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/Debug.cpp')
-rw-r--r--libs/binder/Debug.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/binder/Debug.cpp b/libs/binder/Debug.cpp
index e4ac4b49a4..c6e4fb378d 100644
--- a/libs/binder/Debug.cpp
+++ b/libs/binder/Debug.cpp
@@ -15,6 +15,7 @@
*/
#include "Debug.h"
+#include "BuildFlags.h"
#include <binder/ProcessState.h>
@@ -301,6 +302,11 @@ void printHexData(int32_t indent, const void *buf, size_t length,
}
ssize_t getBinderKernelReferences(size_t count, uintptr_t* buf) {
+ if constexpr (!kEnableKernelIpc) {
+ LOG_ALWAYS_FATAL("Binder kernel driver disabled at build time");
+ return 0;
+ }
+
sp<ProcessState> proc = ProcessState::selfOrNull();
if (proc.get() == nullptr) {
return 0;