mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-25 14:56:10 +03:00
third_party/jni_zero: Remove JNI functions
This commit is contained in:
parent
100c34ac00
commit
a87831442d
21
src/third_party/jni_zero/BUILD.gn
vendored
21
src/third_party/jni_zero/BUILD.gn
vendored
@ -18,25 +18,6 @@ config("jni_zero_defines") {
|
||||
}
|
||||
}
|
||||
|
||||
generate_jni("generate_jni") {
|
||||
sources = [
|
||||
"java/src/org/jni_zero/JniInit.java",
|
||||
"java/src/org/jni_zero/JniUtil.java",
|
||||
]
|
||||
visibility = [
|
||||
":*",
|
||||
"//components/cronet/android/*",
|
||||
]
|
||||
}
|
||||
|
||||
generate_jar_jni("system_jni") {
|
||||
classes = [
|
||||
"java/util/Arrays.class",
|
||||
"java/util/Collection.class",
|
||||
]
|
||||
visibility = [ ":*" ]
|
||||
}
|
||||
|
||||
# This is the public target that we intend others to use.
|
||||
component("jni_zero") {
|
||||
public = [
|
||||
@ -73,8 +54,6 @@ component("jni_zero") {
|
||||
}
|
||||
|
||||
deps = [
|
||||
":generate_jni($default_toolchain)",
|
||||
":system_jni($default_toolchain)",
|
||||
]
|
||||
}
|
||||
|
||||
|
12
src/third_party/jni_zero/common_apis.cc
vendored
12
src/third_party/jni_zero/common_apis.cc
vendored
@ -4,30 +4,26 @@
|
||||
|
||||
#include "third_party/jni_zero/common_apis.h"
|
||||
|
||||
#include "third_party/jni_zero/generate_jni/JniUtil_jni.h"
|
||||
#include "third_party/jni_zero/system_jni/Arrays_jni.h"
|
||||
#include "third_party/jni_zero/system_jni/Collection_jni.h"
|
||||
|
||||
namespace jni_zero {
|
||||
|
||||
ScopedJavaLocalRef<jobjectArray> CollectionToArray(
|
||||
JNIEnv* env,
|
||||
const JavaRef<jobject>& collection) {
|
||||
return JNI_Collection::Java_Collection_toArray(env, collection);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ScopedJavaLocalRef<jobject> ArrayToList(JNIEnv* env,
|
||||
const JavaRef<jobjectArray>& array) {
|
||||
return JNI_Arrays::Java_Arrays_asList(env, array);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ScopedJavaLocalRef<jobjectArray> MapToArray(JNIEnv* env,
|
||||
const JavaRef<jobject>& map) {
|
||||
return Java_JniUtil_mapToArray(env, map);
|
||||
return nullptr;
|
||||
}
|
||||
ScopedJavaLocalRef<jobject> ArrayToMap(JNIEnv* env,
|
||||
const JavaRef<jobjectArray>& array) {
|
||||
return Java_JniUtil_arrayToMap(env, array);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace jni_zero
|
||||
|
8
src/third_party/jni_zero/jni_zero.cc
vendored
8
src/third_party/jni_zero/jni_zero.cc
vendored
@ -6,7 +6,6 @@
|
||||
|
||||
#include <sys/prctl.h>
|
||||
|
||||
#include "third_party/jni_zero/generate_jni/JniInit_jni.h"
|
||||
#include "third_party/jni_zero/jni_methods.h"
|
||||
#include "third_party/jni_zero/jni_zero_internal.h"
|
||||
#include "third_party/jni_zero/logging.h"
|
||||
@ -124,13 +123,6 @@ void InitVM(JavaVM* vm) {
|
||||
g_string_class = GetSystemClassGlobalRef(env, "java/lang/String");
|
||||
g_empty_string.Reset(
|
||||
env, ScopedJavaLocalRef<jstring>(env, env->NewString(nullptr, 0)));
|
||||
ScopedJavaLocalRef<jobjectArray> globals = Java_JniInit_init(env);
|
||||
g_empty_list.Reset(env,
|
||||
ScopedJavaLocalRef<jobject>(
|
||||
env, env->GetObjectArrayElement(globals.obj(), 0)));
|
||||
g_empty_map.Reset(env,
|
||||
ScopedJavaLocalRef<jobject>(
|
||||
env, env->GetObjectArrayElement(globals.obj(), 1)));
|
||||
}
|
||||
|
||||
void DisableJvmForTesting() {
|
||||
|
Loading…
Reference in New Issue
Block a user