Android: Fix JavaLangClash warning
The warnings is this: org.webrtc.ClassLoader clashes with java.lang.ClassLoader This CL fixes that by renaming org.webrtc.ClassLoader to org.webrtc.WebRtcClassLoader. Bug: webrtc:6597,webrtc:8534 Change-Id: Ia392850cd2d0eb0683c03607d0cec06904de532f Reviewed-on: https://webrtc-review.googlesource.com/23680 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20715}
This commit is contained in:
committed by
Commit Bot
parent
c0fd5f97a8
commit
4d85e8a78c
@ -15,9 +15,9 @@ package org.webrtc;
|
||||
* what thread it's called from. Such a ClassLoader is needed for the few cases where the JNI
|
||||
* mechanism is unable to automatically determine the appropriate ClassLoader instance.
|
||||
*/
|
||||
class ClassLoader {
|
||||
class WebRtcClassLoader {
|
||||
@CalledByNative
|
||||
static Object getClassLoader() {
|
||||
return ClassLoader.class.getClassLoader();
|
||||
return WebRtcClassLoader.class.getClassLoader();
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "rtc_base/checks.h"
|
||||
#include "sdk/android/generated_base_jni/jni/ClassLoader_jni.h"
|
||||
#include "sdk/android/generated_base_jni/jni/WebRtcClassLoader_jni.h"
|
||||
|
||||
// Abort the process if |jni| has a Java exception pending. This macros uses the
|
||||
// comma operator to execute ExceptionDescribe and ExceptionClear ignoring their
|
||||
@ -38,7 +38,8 @@ class ClassLoader {
|
||||
env->GetMethodID(class_loader_class_, "loadClass",
|
||||
"(Ljava/lang/String;)Ljava/lang/Class;");
|
||||
CHECK_EXCEPTION(env);
|
||||
class_loader_ = env->NewGlobalRef(Java_ClassLoader_getClassLoader(env));
|
||||
class_loader_ =
|
||||
env->NewGlobalRef(Java_WebRtcClassLoader_getClassLoader(env));
|
||||
CHECK_EXCEPTION(env);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user