Remove RTC_JNI_GENERATOR_LEGACY_SYMBOLS.
Bug: b/325408567
Change-Id: I4bd5fbe7cecdfd3fcce8da352ce30eeb0f5b6dd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356780
Reviewed-by: ZoƩ Lepaul <xalep@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42615}
diff --git a/BUILD.gn b/BUILD.gn
index 7328df1..3c78142 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -139,10 +139,6 @@
cflags = []
ldflags = []
- if (rtc_jni_generator_legacy_symbols) {
- defines += [ "RTC_JNI_GENERATOR_LEGACY_SYMBOLS" ]
- }
-
if (rtc_objc_prefix != "") {
defines += [ "RTC_OBJC_TYPE_PREFIX=${rtc_objc_prefix}" ]
}
diff --git a/sdk/android/native_api/jni/java_types.cc b/sdk/android/native_api/jni/java_types.cc
index 363bd95..58b6b6b 100644
--- a/sdk/android/native_api/jni/java_types.cc
+++ b/sdk/android/native_api/jni/java_types.cc
@@ -178,35 +178,19 @@
}
ScopedJavaLocalRef<jobject> NativeToJavaBoolean(JNIEnv* env, bool b) {
-#ifdef RTC_JNI_GENERATOR_LEGACY_SYMBOLS
- return JNI_Boolean::Java_Boolean_ConstructorJLB_Z(env, b);
-#else
return JNI_Boolean::Java_Boolean_Constructor__boolean(env, b);
-#endif
}
ScopedJavaLocalRef<jobject> NativeToJavaDouble(JNIEnv* env, double d) {
-#ifdef RTC_JNI_GENERATOR_LEGACY_SYMBOLS
- return JNI_Double::Java_Double_ConstructorJLD_D(env, d);
-#else
return JNI_Double::Java_Double_Constructor__double(env, d);
-#endif
}
ScopedJavaLocalRef<jobject> NativeToJavaInteger(JNIEnv* jni, int32_t i) {
-#ifdef RTC_JNI_GENERATOR_LEGACY_SYMBOLS
- return JNI_Integer::Java_Integer_ConstructorJLI_I(jni, i);
-#else
return JNI_Integer::Java_Integer_Constructor__int(jni, i);
-#endif
}
ScopedJavaLocalRef<jobject> NativeToJavaLong(JNIEnv* env, int64_t u) {
-#ifdef RTC_JNI_GENERATOR_LEGACY_SYMBOLS
- return JNI_Long::Java_Long_ConstructorJLLO_J(env, u);
-#else
return JNI_Long::Java_Long_Constructor__long(env, u);
-#endif
}
ScopedJavaLocalRef<jstring> NativeToJavaString(JNIEnv* env, const char* str) {
@@ -340,33 +324,19 @@
}
JavaListBuilder::JavaListBuilder(JNIEnv* env)
-#ifdef RTC_JNI_GENERATOR_LEGACY_SYMBOLS
- : env_(env),
- j_list_(JNI_ArrayList::Java_ArrayList_ConstructorJUALI(env)) {}
-#else
: env_(env), j_list_(JNI_ArrayList::Java_ArrayList_Constructor(env)) {
}
-#endif
- JavaListBuilder::~JavaListBuilder() = default;
+JavaListBuilder::~JavaListBuilder() = default;
void JavaListBuilder::add(const JavaRef<jobject>& element) {
-#ifdef RTC_JNI_GENERATOR_LEGACY_SYMBOLS
- JNI_ArrayList::Java_ArrayList_addZ_JUE(env_, j_list_, element);
-#else
JNI_ArrayList::Java_ArrayList_add(env_, j_list_, element);
-#endif
}
JavaMapBuilder::JavaMapBuilder(JNIEnv* env)
: env_(env),
-#ifdef RTC_JNI_GENERATOR_LEGACY_SYMBOLS
- j_map_(JNI_LinkedHashMap::Java_LinkedHashMap_ConstructorJULIHM(env)) {
-}
-#else
j_map_(JNI_LinkedHashMap::Java_LinkedHashMap_Constructor(env)) {
}
-#endif
JavaMapBuilder::~JavaMapBuilder() = default;
diff --git a/sdk/android/src/jni/pc/rtc_stats_collector_callback_wrapper.cc b/sdk/android/src/jni/pc/rtc_stats_collector_callback_wrapper.cc
index dc1dcf3..a6d9e3a 100644
--- a/sdk/android/src/jni/pc/rtc_stats_collector_callback_wrapper.cc
+++ b/sdk/android/src/jni/pc/rtc_stats_collector_callback_wrapper.cc
@@ -26,13 +26,8 @@
namespace {
ScopedJavaLocalRef<jobject> NativeToJavaBigInteger(JNIEnv* env, uint64_t u) {
-#ifdef RTC_JNI_GENERATOR_LEGACY_SYMBOLS
- return JNI_BigInteger::Java_BigInteger_ConstructorJMBI_JLS(
- env, NativeToJavaString(env, rtc::ToString(u)));
-#else
return JNI_BigInteger::Java_BigInteger_Constructor__String(
env, NativeToJavaString(env, rtc::ToString(u)));
-#endif
}
ScopedJavaLocalRef<jobjectArray> NativeToJavaBigIntegerArray(
diff --git a/webrtc.gni b/webrtc.gni
index cb7c65d..dfa7033 100644
--- a/webrtc.gni
+++ b/webrtc.gni
@@ -53,10 +53,6 @@
}
declare_args() {
- # If set to true, C++ code will refer to the new JNI Generator symbols.
- # If set to false the old ones will be used (to provide a nice update path).
- rtc_jni_generator_legacy_symbols = false
-
# Setting this to true, will make RTC_DLOG() expand to log statements instead
# of being removed by the preprocessor.
# This is useful for example to be able to get RTC_DLOGs on a release build.