summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2018-10-19 07:28:46 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-10-19 07:28:46 -0700
commit3466efff36c15ab73b82a64a55b51dd51da27bca (patch)
tree08523c747838f0aa8a2de045033f23bd5a5ae256
parentdf053395ab7f431c14640eb98d4d7ce7d923ee13 (diff)
parentd88ac7f787eb4541a0afb8903f87267d039c98e1 (diff)
downloadnative-pie-temp.tar.gz
Merge changes from topic "binder-primitive-array"pie-temp
am: d88ac7f787 Change-Id: Ic2d26563ce1a3fdb0873a61714d1440ab537f546
-rw-r--r--libs/binder/ndk/include_ndk/android/binder_parcel.h8
-rw-r--r--libs/binder/ndk/include_ndk/android/binder_parcel_utils.h6
-rw-r--r--libs/binder/ndk/parcel.cpp6
3 files changed, 10 insertions, 10 deletions
diff --git a/libs/binder/ndk/include_ndk/android/binder_parcel.h b/libs/binder/ndk/include_ndk/android/binder_parcel.h
index 73df69c0e3..d36b3c06f3 100644
--- a/libs/binder/ndk/include_ndk/android/binder_parcel.h
+++ b/libs/binder/ndk/include_ndk/android/binder_parcel.h
@@ -136,12 +136,12 @@ typedef int8_t* (*AParcel_byteArrayGetter)(void* arrayData);
*
* If allocation fails, null should be returned.
*/
-typedef void* (*AParcel_string_reallocator)(void* stringData, size_t length);
+typedef void* (*AParcel_stringReallocator)(void* stringData, size_t length);
/**
* This is called to get the buffer from a stringData object.
*/
-typedef char* (*AParcel_string_getter)(void* stringData);
+typedef char* (*AParcel_stringGetter)(void* stringData);
/**
* Writes an AIBinder to the next location in a non-null parcel. Can be null.
@@ -198,8 +198,8 @@ binder_status_t AParcel_writeString(AParcel* parcel, const char* string, size_t
* If this function returns a success, the buffer returned by allocator when passed stringData will
* contain a null-terminated c-str read from the binder.
*/
-binder_status_t AParcel_readString(const AParcel* parcel, AParcel_string_reallocator reallocator,
- AParcel_string_getter getter, void** stringData)
+binder_status_t AParcel_readString(const AParcel* parcel, AParcel_stringReallocator reallocator,
+ AParcel_stringGetter getter, void** stringData)
__INTRODUCED_IN(29);
// @START-PRIMITIVE-READ-WRITE
diff --git a/libs/binder/ndk/include_ndk/android/binder_parcel_utils.h b/libs/binder/ndk/include_ndk/android/binder_parcel_utils.h
index 6341b46d21..faeb78fdfa 100644
--- a/libs/binder/ndk/include_ndk/android/binder_parcel_utils.h
+++ b/libs/binder/ndk/include_ndk/android/binder_parcel_utils.h
@@ -270,7 +270,7 @@ inline binder_status_t AParcel_readVector<int8_t>(const AParcel* parcel, std::ve
* Takes a std::string and reallocates it to the specified length. For use with AParcel_readString.
* See use below in AParcel_readString.
*/
-static inline void* AParcel_std_string_reallocator(void* stringData, size_t length) {
+static inline void* AParcel_stdStringReallocator(void* stringData, size_t length) {
std::string* str = static_cast<std::string*>(stringData);
str->resize(length - 1);
return stringData;
@@ -279,7 +279,7 @@ static inline void* AParcel_std_string_reallocator(void* stringData, size_t leng
/**
* Takes a std::string and returns the inner char*.
*/
-static inline char* AParcel_std_string_getter(void* stringData) {
+static inline char* AParcel_stdStringGetter(void* stringData) {
std::string* str = static_cast<std::string*>(stringData);
return &(*str)[0];
}
@@ -296,7 +296,7 @@ static inline binder_status_t AParcel_writeString(AParcel* parcel, const std::st
*/
static inline binder_status_t AParcel_readString(const AParcel* parcel, std::string* str) {
void* stringData = static_cast<void*>(str);
- return AParcel_readString(parcel, AParcel_std_string_reallocator, AParcel_std_string_getter,
+ return AParcel_readString(parcel, AParcel_stdStringReallocator, AParcel_stdStringGetter,
&stringData);
}
diff --git a/libs/binder/ndk/parcel.cpp b/libs/binder/ndk/parcel.cpp
index 5279b549ce..29094dba7b 100644
--- a/libs/binder/ndk/parcel.cpp
+++ b/libs/binder/ndk/parcel.cpp
@@ -255,8 +255,8 @@ binder_status_t AParcel_writeString(AParcel* parcel, const char* string, size_t
return STATUS_OK;
}
-binder_status_t AParcel_readString(const AParcel* parcel, AParcel_string_reallocator reallocator,
- AParcel_string_getter getter, void** stringData) {
+binder_status_t AParcel_readString(const AParcel* parcel, AParcel_stringReallocator reallocator,
+ AParcel_stringGetter getter, void** stringData) {
size_t len16;
const char16_t* str16 = parcel->get()->readString16Inplace(&len16);
@@ -287,7 +287,7 @@ binder_status_t AParcel_readString(const AParcel* parcel, AParcel_string_realloc
char* str8 = getter(*stringData);
if (str8 == nullptr) {
- LOG(WARNING) << __func__ << ": AParcel_string_allocator failed to allocate.";
+ LOG(WARNING) << __func__ << ": AParcel_stringReallocator failed to allocate.";
return STATUS_NO_MEMORY;
}