diff options
author | 2022-12-29 05:40:26 +0000 | |
---|---|---|
committer | 2022-12-29 05:40:26 +0000 | |
commit | ae9dd5a3aa1c00fea7479f1428db4a3e173c8d00 (patch) | |
tree | 5d1728976d6984a3875254e4fc80bdd4ba1c5305 | |
parent | 2e273f178be54d15370063db599c64d2b966427a (diff) | |
parent | f270b1d4440e8056532202006b136a8ccbfcd1da (diff) |
Merge "libbinder_ndk: add warning to linkToDeath"
-rw-r--r-- | libs/binder/ndk/include_ndk/android/binder_ibinder.h | 6 |
1 files changed, 6 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 05677a8e5d..db2d2c1b09 100644 --- a/libs/binder/ndk/include_ndk/android/binder_ibinder.h +++ b/libs/binder/ndk/include_ndk/android/binder_ibinder.h @@ -594,6 +594,9 @@ typedef void (*AIBinder_DeathRecipient_onBinderDied)(void* cookie) __INTRODUCED_ * * See also AIBinder_linkToDeath/AIBinder_unlinkToDeath. * + * WARNING: Make sure the lifetime of this cookie is long enough. If it is dynamically + * allocated, it should be deleted with AIBinder_DeathRecipient_setOnUnlinked. + * * Available since API level 33. * * \param cookie the cookie passed to AIBinder_linkToDeath. @@ -605,6 +608,9 @@ typedef void (*AIBinder_DeathRecipient_onBinderUnlinked)(void* cookie) __INTRODU * * Available since API level 29. * + * WARNING: Make sure the lifetime of this cookie is long enough. If it is dynamically + * allocated, it should be deleted with AIBinder_DeathRecipient_setOnUnlinked. + * * \param onBinderDied the callback to call when this death recipient is invoked. * * \return the newly constructed object (or null if onBinderDied is null). |