summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-10-21 17:38:23 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-10-21 17:38:23 +0000
commit4c5236e80f6cd4df10e9aa83142580ec9f9ee93c (patch)
tree8b8e145cc9825a0d76717c30388bb1bf2012c151
parent048a18146ac8c66c4f92658f29039b0a421c85a5 (diff)
parent21c78a301aeff0614c0ec5eadd744c33711e4bad (diff)
Merge "Document return values of ABinderRpc_Accessor_delegateAccessor" into main am: a72b5858a0 am: 21c78a301a
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3312669 Change-Id: If5652e8d0a322e8e792247e04310dbfc6cb64b59 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/binder/ndk/binder_rpc.cpp4
-rw-r--r--libs/binder/ndk/include_platform/android/binder_rpc.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/libs/binder/ndk/binder_rpc.cpp b/libs/binder/ndk/binder_rpc.cpp
index 07b8c40740..886eb4bdf8 100644
--- a/libs/binder/ndk/binder_rpc.cpp
+++ b/libs/binder/ndk/binder_rpc.cpp
@@ -255,7 +255,7 @@ ABinderRpc_Accessor* ABinderRpc_Accessor_new(
"new variant was added to the ABinderRpc_ConnectionInfo and this needs to be "
"updated.");
}
- return OK;
+ return STATUS_OK;
};
sp<IBinder> accessorBinder = android::createAccessor(String16(instance), std::move(generate));
if (accessorBinder == nullptr) {
@@ -321,7 +321,7 @@ binder_status_t ABinderRpc_Accessor_delegateAccessor(const char* instance, AIBin
// This AIBinder needs a strong ref to pass ownership to the caller
binder->incStrong(nullptr);
*outDelegator = binder.get();
- return OK;
+ return STATUS_OK;
}
ABinderRpc_ConnectionInfo* ABinderRpc_ConnectionInfo_new(const sockaddr* addr, socklen_t len) {
diff --git a/libs/binder/ndk/include_platform/android/binder_rpc.h b/libs/binder/ndk/include_platform/android/binder_rpc.h
index 9fe5d788b4..66667d33bd 100644
--- a/libs/binder/ndk/include_platform/android/binder_rpc.h
+++ b/libs/binder/ndk/include_platform/android/binder_rpc.h
@@ -287,6 +287,11 @@ ABinderRpc_Accessor* _Nullable ABinderRpc_Accessor_fromBinder(const char* _Nonnu
* this object with one strong ref count and is responsible for removing
* that ref count with with AIBinder_decStrong when the caller wishes to
* drop the reference.
+ * \return STATUS_OK on success.
+ * STATUS_UNEXPECTED_NULL if instance or binder arguments are null.
+ * STATUS_BAD_TYPE if the binder is not an IAccessor.
+ * STATUS_NAME_NOT_FOUND if the binder is an IAccessor, but not
+ * associated with the provided instance name.
*/
binder_status_t ABinderRpc_Accessor_delegateAccessor(const char* _Nonnull instance,
AIBinder* _Nonnull binder,