Add an alias to jni_zero::AdoptRef and CreateLeaky in webrtc Recently, JNI Zero has introduced two helper functions: 1. jni_zero::AdoptRef() which constructs a ScopedJavaLocalRef 2. jni_zero::CreateLeaky() which constructs a JavaRef This CL adds aliases to these two functions in the webrtc namespace. These aliases will be used later in google3. Bug: chromium:481689330 Change-Id: I42f91ec95b2a6059335733fc95af046af5dfa80b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/466660 Commit-Queue: Martin Kong <martinkong@google.com> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Evan Shrubsole <eshr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47555}
diff --git a/sdk/android/native_api/jni/scoped_java_ref.h b/sdk/android/native_api/jni/scoped_java_ref.h index fc25b85..94a1ac1 100644 --- a/sdk/android/native_api/jni/scoped_java_ref.h +++ b/sdk/android/native_api/jni/scoped_java_ref.h
@@ -21,6 +21,8 @@ namespace webrtc { template <typename T> using JavaParamRef = jni_zero::JavaRef<T>; +using jni_zero::AdoptRef; +using jni_zero::CreateLeaky; using jni_zero::JavaRef; using jni_zero::ScopedJavaGlobalRef; using jni_zero::ScopedJavaLocalRef;