modules/utility/source/jvm_android.cc
void LoadClasses(JNIEnv* jni) {
  for (auto& c : loaded_classes) {
    jclass localRef = FindClass(jni, c.name);
    CHECK_EXCEPTION(jni) << "Error during FindClass: " << c.name;
    RTC_CHECK(localRef) << c.name;
    jclass globalRef = reinterpret_cast<jclass>(jni->NewGlobalRef(localRef));
    CHECK_EXCEPTION(jni) << "Error during NewGlobalRef: " << c.name;
    RTC_CHECK(globalRef) << c.name;
    c.clazz = globalRef;
  }
}
// Android's FindClass() is trickier than usual because the app-specific
// ClassLoader is not consulted when there is no app-specific frame on the
// stack.  Consequently, we only look up all classes once in native WebRTC.
// http://developer.android.com/training/articles/perf-jni.html#faq_FindClass
Android's FindClass() is trickier than usual because the app-specific
ClassLoader is not consulted when there is no app-specific frame on the
stack.  Consequently, we only look up all classes once in native WebRTC.
Android ' s FindClass () is trickier than usual because the app - specific ClassLoader is not consulted when there is no app - specific frame on the stack . Consequently we only look up all classes once in native WebRTC .
void LoadClasses(JNIEnv* jni) {
  for (auto& c : loaded_classes) {
    jclass localRef = FindClass(jni, c.name);
    CHECK_EXCEPTION(jni) << "Error during FindClass: " << c.name;
    RTC_CHECK(localRef) << c.name;
    jclass globalRef = reinterpret_cast<jclass>(jni->NewGlobalRef(localRef));
    CHECK_EXCEPTION(jni) << "Error during NewGlobalRef: " << c.name;
    RTC_CHECK(globalRef) << c.name;
    c.clazz = globalRef;
  }
}
void LoadClasses ( JNIEnv * jni ) { for ( auto & c : loaded_classes ) { jclass localRef = FindClass ( jni , c . name ) ; CHECK_EXCEPTION ( jni ) << " " << c . name ; RTC_CHECK ( localRef ) << c . name ; jclass globalRef = reinterpret_cast < jclass > ( jni -> NewGlobalRef ( localRef ) ) ; CHECK_EXCEPTION ( jni ) << " " << c . name ; RTC_CHECK ( globalRef ) << c . name ; c . clazz = globalRef ; } }
Android's FindClass() is trickier than usual because the app-specific
ClassLoader is not consulted when there is no app-specific frame on the
stack.
Android ' s FindClass () is trickier than usual because the app - specific ClassLoader is not consulted when there is no app - specific frame on the stack .