libbinder: stop exporting private headers
Having a 'private' include directory for a library is somewhat of an
artifact. There is no need to export these (or once include_dirs is
eliminated, make them available at any capacity). We want libbinder to
completely encapsulate the kernel API.
Bug: N/A
Test: binderLibTest
Change-Id: If84ff928a186f3397150660c2cc1faadb46b796c
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 6fb1227..ef7fd44 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -29,8 +29,6 @@
#include <utils/SystemClock.h>
#include <utils/threads.h>
-#include <private/binder/binder_module.h>
-
#include <atomic>
#include <errno.h>
#include <inttypes.h>
@@ -43,6 +41,7 @@
#include <unistd.h>
#include "Static.h"
+#include "binder_module.h"
#if LOG_NDEBUG
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 39d6a2e..2e4f450 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -48,10 +48,10 @@
#include <utils/String8.h>
#include <utils/misc.h>
-#include <private/binder/binder_module.h>
#include "RpcState.h"
#include "Static.h"
#include "Utils.h"
+#include "binder_module.h"
#define LOG_REFS(...)
//#define LOG_REFS(...) ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__)
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index a2efb1c..f7ca1e6 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -27,8 +27,8 @@
#include <utils/String8.h>
#include <utils/threads.h>
-#include <private/binder/binder_module.h>
#include "Static.h"
+#include "binder_module.h"
#include <errno.h>
#include <fcntl.h>
diff --git a/libs/binder/include/private/binder/binder_module.h b/libs/binder/binder_module.h
similarity index 85%
rename from libs/binder/include/private/binder/binder_module.h
rename to libs/binder/binder_module.h
index 151235c..9dea3b4 100644
--- a/libs/binder/include/private/binder/binder_module.h
+++ b/libs/binder/binder_module.h
@@ -29,14 +29,14 @@
#undef B_PACK_CHARS
#endif
-#include <sys/ioctl.h>
#include <linux/android/binder.h>
+#include <sys/ioctl.h>
#ifndef BR_FROZEN_REPLY
// Temporary definition of BR_FROZEN_REPLY. For production
// this will come from UAPI binder.h
#define BR_FROZEN_REPLY _IO('r', 18)
-#endif //BR_FROZEN_REPLY
+#endif // BR_FROZEN_REPLY
#ifndef BINDER_FREEZE
/*
@@ -49,46 +49,46 @@
//
// Group-leader PID of process to be frozen
//
- uint32_t pid;
+ uint32_t pid;
//
// Enable(1) / Disable(0) freeze for given PID
//
- uint32_t enable;
+ uint32_t enable;
//
// Timeout to wait for transactions to drain.
// 0: don't wait (ioctl will return EAGAIN if not drained)
// N: number of ms to wait
- uint32_t timeout_ms;
+ uint32_t timeout_ms;
};
-#endif //BINDER_FREEZE
+#endif // BINDER_FREEZE
#ifndef BINDER_GET_FROZEN_INFO
-#define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info)
+#define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info)
struct binder_frozen_status_info {
//
// Group-leader PID of process to be queried
//
- __u32 pid;
+ __u32 pid;
//
// Indicates whether the process has received any sync calls since last
// freeze (cleared at freeze/unfreeze)
//
- __u32 sync_recv;
+ __u32 sync_recv;
//
// Indicates whether the process has received any async calls since last
// freeze (cleared at freeze/unfreeze)
//
- __u32 async_recv;
+ __u32 async_recv;
};
-#endif //BINDER_GET_FROZEN_INFO
+#endif // BINDER_GET_FROZEN_INFO
#ifndef BR_ONEWAY_SPAM_SUSPECT
// Temporary definition of BR_ONEWAY_SPAM_SUSPECT. For production
// this will come from UAPI binder.h
#define BR_ONEWAY_SPAM_SUSPECT _IO('r', 19)
-#endif //BR_ONEWAY_SPAM_SUSPECT
+#endif // BR_ONEWAY_SPAM_SUSPECT
#ifndef BINDER_ENABLE_ONEWAY_SPAM_DETECTION
/*
@@ -96,6 +96,6 @@
* these will be defined in the UAPI binder.h file from upstream kernel.
*/
#define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32)
-#endif //BINDER_ENABLE_ONEWAY_SPAM_DETECTION
+#endif // BINDER_ENABLE_ONEWAY_SPAM_DETECTION
#endif // _BINDER_MODULE_H_
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp
index dc8c0f1..5676bd1 100644
--- a/libs/binder/tests/binderLibTest.cpp
+++ b/libs/binder/tests/binderLibTest.cpp
@@ -31,11 +31,11 @@
#include <binder/IServiceManager.h>
#include <binder/ParcelRef.h>
-#include <private/binder/binder_module.h>
#include <linux/sched.h>
#include <sys/epoll.h>
#include <sys/prctl.h>
+#include "../binder_module.h"
#include "binderAbiHelper.h"
#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])