summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2018-10-11 16:14:13 -0700
committerSteven Moreland <smoreland@google.com>2018-10-11 16:14:13 -0700
commitfb4508535ddf40800430b324e6c6747a22b03908 (patch)
tree23e51730672be68587800bf45d44a27503a3f22d
parentea96f70b7698694119e18826bfb2aa7b40f92dc6 (diff)
downloadnative-fb4508535ddf40800430b324e6c6747a22b03908.tar.gz
libbinder_ndk: clarify local AIBinder_linkToDeath
When a binder is local, process death means that the client calling linkToDeath will also die. In this case, there is no need to use a death recipient, so an error is returned. Bug: 112664205 Test: atest android.binder.cts Change-Id: I675637e937c1ac7a584a2d97bb1238e5b9f3e030
-rw-r--r--libs/binder/ndk/include_ndk/android/binder_ibinder.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/binder/ndk/include_ndk/android/binder_ibinder.h b/libs/binder/ndk/include_ndk/android/binder_ibinder.h
index f237e695ce..c222c161f5 100644
--- a/libs/binder/ndk/include_ndk/android/binder_ibinder.h
+++ b/libs/binder/ndk/include_ndk/android/binder_ibinder.h
@@ -207,6 +207,8 @@ binder_status_t AIBinder_ping(AIBinder* binder) __INTRODUCED_IN(29);
* null. The exact cookie must also be used to unlink this transaction (see AIBinder_linkToDeath).
* This function may return a binder transaction failure. The cookie can be used both for
* identification and holding user data.
+ *
+ * If binder is local, this will return STATUS_INVALID_OPERATION.
*/
binder_status_t AIBinder_linkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient,
void* cookie) __INTRODUCED_IN(29);