Merge "libbinder: disallow upgrade of explicit version"
diff --git a/cmds/lshal/ListCommand.cpp b/cmds/lshal/ListCommand.cpp
index 2722e21..ff73c94 100644
--- a/cmds/lshal/ListCommand.cpp
+++ b/cmds/lshal/ListCommand.cpp
@@ -28,6 +28,7 @@
#include <sstream>
#include <android-base/file.h>
+#include <android-base/hex.h>
#include <android-base/logging.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
#include <hidl-hash/Hash.h>
@@ -691,8 +692,7 @@
}
auto&& hashArray = hashChain[hashIndex];
- std::vector<uint8_t> hashVec{hashArray.data(), hashArray.data() + hashArray.size()};
- entry->hash = Hash::hexString(hashVec);
+ entry->hash = android::base::HexString(hashArray.data(), hashArray.size());
});
if (!hashRet.isOk()) {
handleError(TRANSACTION_ERROR, "getHashChain failed: " + hashRet.description());
diff --git a/cmds/lshal/TableEntry.cpp b/cmds/lshal/TableEntry.cpp
index 8e21975..1753343 100644
--- a/cmds/lshal/TableEntry.cpp
+++ b/cmds/lshal/TableEntry.cpp
@@ -18,6 +18,7 @@
#include <map>
+#include <android-base/hex.h>
#include <android-base/strings.h>
#include <hidl-hash/Hash.h>
#include <vintf/parse_string.h>
@@ -104,7 +105,8 @@
}
std::string TableEntry::isReleased() const {
- static const std::string unreleased = Hash::hexString(Hash::kEmptyHash);
+ static const std::string unreleased = android::base::HexString(Hash::kEmptyHash.data(),
+ Hash::kEmptyHash.size());
if (hash.empty()) {
return "?";
diff --git a/docs/Doxyfile b/docs/Doxyfile
index a1bd960..ea22337 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -1638,6 +1638,7 @@
"__attribute__(x)=" \
__ANDROID__ \
__BIONIC__ \
+ "U_IN_DOXYGEN=1" \ # Required by the ICU4C module only
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
diff --git a/libs/binder/tests/binderRpcBenchmark.cpp b/libs/binder/tests/binderRpcBenchmark.cpp
index 26a0b90..5f4a7b5 100644
--- a/libs/binder/tests/binderRpcBenchmark.cpp
+++ b/libs/binder/tests/binderRpcBenchmark.cpp
@@ -26,6 +26,7 @@
#include <thread>
+#include <signal.h>
#include <sys/prctl.h>
#include <sys/types.h>
#include <unistd.h>
@@ -154,6 +155,16 @@
std::cerr << "\t\\" << Transport::KERNEL << " is KERNEL" << std::endl;
std::cerr << "\t\\" << Transport::RPC << " is RPC" << std::endl;
+ if (0 == fork()) {
+ prctl(PR_SET_PDEATHSIG, SIGHUP); // racey, okay
+ sp<RpcServer> server = RpcServer::make();
+ server->setRootObject(sp<MyBinderRpcBenchmark>::make());
+ server->iUnderstandThisCodeIsExperimentalAndIWillNotUseItInProduction();
+ CHECK(server->setupUnixDomainServer(addr.c_str()));
+ server->join();
+ exit(1);
+ }
+
#ifdef __BIONIC__
if (0 == fork()) {
prctl(PR_SET_PDEATHSIG, SIGHUP); // racey, okay
@@ -161,6 +172,7 @@
defaultServiceManager()->addService(kKernelBinderInstance,
sp<MyBinderRpcBenchmark>::make()));
IPCThreadState::self()->joinThreadPool();
+ exit(1);
}
ProcessState::self()->setThreadPoolMaxThreadCount(1);
@@ -170,14 +182,6 @@
CHECK_NE(nullptr, gKernelBinder.get());
#endif
- std::thread([addr]() {
- sp<RpcServer> server = RpcServer::make();
- server->setRootObject(sp<MyBinderRpcBenchmark>::make());
- server->iUnderstandThisCodeIsExperimentalAndIWillNotUseItInProduction();
- CHECK(server->setupUnixDomainServer(addr.c_str()));
- server->join();
- }).detach();
-
for (size_t tries = 0; tries < 5; tries++) {
usleep(10000);
if (gSession->setupUnixDomainClient(addr.c_str())) goto success;