diff options
| author | 2022-04-22 01:30:45 +0000 | |
|---|---|---|
| committer | 2022-04-22 01:30:45 +0000 | |
| commit | bbcefaede8100dfef243192f504fac0ee3e511fe (patch) | |
| tree | 1a0e5cf15371cb8aa5b458ab23efe53e5380a066 | |
| parent | 06fc13cd9946a9476b2be9eaa034fec202723bfd (diff) | |
| parent | 8d17c4547a43580d96713111622fe0f341dd34e9 (diff) | |
Merge "javaObjectForIBinder: warn rets global and local"
| -rw-r--r-- | libs/binder/ndk/include_ndk/android/binder_ibinder_jni.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/binder/ndk/include_ndk/android/binder_ibinder_jni.h b/libs/binder/ndk/include_ndk/android/binder_ibinder_jni.h index 6880d86e1a..8e288b307e 100644 --- a/libs/binder/ndk/include_ndk/android/binder_ibinder_jni.h +++ b/libs/binder/ndk/include_ndk/android/binder_ibinder_jni.h @@ -56,6 +56,12 @@ __attribute__((warn_unused_result)) AIBinder* AIBinder_fromJavaBinder(JNIEnv* en * If the binder is null, null is returned. If this binder object was originally an IBinder object, * the original java object will be returned. * + * WARNING: this function returns global and local references. This can be + * figured out using GetObjectRefType. Though, when this function is called + * from within a Java context, the local ref will automatically be cleaned + * up. If this is called outside of a Java frame, + * PushObjectFrame/PopObjectFrame can simulate this automatic cleanup. + * * Available since API level 29. * * \param env Java environment. Must not be null. |