Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: webrtc/sdk/android/src/jni/jni_helpers.cc

Issue 2531333003: Create the Java Wrapper of RtpReceiverObserverInterface. (Closed)
Patch Set: Fix the failed test. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/sdk/android/src/jni/jni_helpers.h ('k') | webrtc/sdk/android/src/jni/peerconnection_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/src/jni/jni_helpers.cc
diff --git a/webrtc/sdk/android/src/jni/jni_helpers.cc b/webrtc/sdk/android/src/jni/jni_helpers.cc
index 5262f067ed0884ede66e3306292ee3fc525bf160..48145f86cc6471d529a0ddbcbb6bd8e454ddcd40 100644
--- a/webrtc/sdk/android/src/jni/jni_helpers.cc
+++ b/webrtc/sdk/android/src/jni/jni_helpers.cc
@@ -166,6 +166,16 @@ jfieldID GetFieldID(
return f;
}
+jfieldID GetStaticFieldID(JNIEnv* jni,
+ jclass c,
+ const char* name,
+ const char* signature) {
+ jfieldID f = jni->GetStaticFieldID(c, name, signature);
+ CHECK_EXCEPTION(jni) << "error during GetStaticFieldID";
+ RTC_CHECK(f) << name << ", " << signature;
+ return f;
+}
+
jclass GetObjectClass(JNIEnv* jni, jobject object) {
jclass c = jni->GetObjectClass(object);
CHECK_EXCEPTION(jni) << "error during GetObjectClass";
@@ -180,6 +190,13 @@ jobject GetObjectField(JNIEnv* jni, jobject object, jfieldID id) {
return o;
}
+jobject GetStaticObjectField(JNIEnv* jni, jclass c, jfieldID id) {
+ jobject o = jni->GetStaticObjectField(c, id);
+ CHECK_EXCEPTION(jni) << "error during GetStaticObjectField";
+ RTC_CHECK(!IsNull(jni, o)) << "GetStaticObjectField returned NULL";
+ return o;
+}
+
jobject GetNullableObjectField(JNIEnv* jni, jobject object, jfieldID id) {
jobject o = jni->GetObjectField(object, id);
CHECK_EXCEPTION(jni) << "error during GetObjectField";
« no previous file with comments | « webrtc/sdk/android/src/jni/jni_helpers.h ('k') | webrtc/sdk/android/src/jni/peerconnection_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698