Merge "Add .clang-format to hidl-gen."
diff --git a/base/Android.bp b/base/Android.bp
index 5ba464a..e4cf6cb 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -23,7 +23,6 @@
"libutils",
],
export_shared_lib_headers: [
- "libbase",
"libutils",
"libcutils", // for native_handle.h
],
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index 7cc8ef5..7580693 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -70,7 +70,7 @@
if (other.mHandle != nullptr) {
mHandle = native_handle_clone(other.mHandle);
if (mHandle == nullptr) {
- LOG(FATAL) << "Failed to clone native_handle in hidl_handle.";
+ PLOG(FATAL) << "Failed to clone native_handle in hidl_handle";
}
mOwnsHandle = true;
} else {
@@ -217,7 +217,7 @@
// assume my resources are freed.
if (size > UINT32_MAX) {
- LOG(FATAL) << "string size can't exceed 2^32 bytes.";
+ LOG(FATAL) << "string size can't exceed 2^32 bytes: " << size;
}
char *buf = (char *)malloc(size + 1);
memcpy(buf, data, size);
@@ -251,7 +251,7 @@
void hidl_string::setToExternal(const char *data, size_t size) {
if (size > UINT32_MAX) {
- LOG(FATAL) << "string size can't exceed 2^32 bytes.";
+ LOG(FATAL) << "string size can't exceed 2^32 bytes: " << size;
}
clear();
diff --git a/base/include/hidl/MQDescriptor.h b/base/include/hidl/MQDescriptor.h
index abab212..23be971 100644
--- a/base/include/hidl/MQDescriptor.h
+++ b/base/include/hidl/MQDescriptor.h
@@ -17,7 +17,8 @@
#ifndef _FMSGQ_DESCRIPTOR_H
#define _FMSGQ_DESCRIPTOR_H
-#include <android-base/macros.h>
+#include <unistd.h>
+
#include <cutils/native_handle.h>
#include <hidl/HidlInternal.h>
#include <hidl/HidlSupport.h>
diff --git a/base/include/hidl/Status.h b/base/include/hidl/Status.h
index 9ee80ea..7c716c7 100644
--- a/base/include/hidl/Status.h
+++ b/base/include/hidl/Status.h
@@ -20,7 +20,6 @@
#include <cstdint>
#include <sstream>
-#include <android-base/macros.h>
#include <hidl/HidlInternal.h>
#include <utils/Errors.h>
#include <utils/StrongPointer.h>