@@ -772,21 +772,6 @@ MonodroidRuntime::create_domain (JNIEnv *env, jstring_array_wrapper &runtimeApks
772
772
return domain;
773
773
}
774
774
775
- inline int
776
- MonodroidRuntime::LocalRefsAreIndirect (JNIEnv *env, jclass runtimeClass, int version)
777
- {
778
- if (version < 14 ) {
779
- java_System = nullptr ;
780
- java_System_identityHashCode = 0 ;
781
- return 0 ;
782
- }
783
-
784
- java_System = RuntimeUtil::get_class_from_runtime_field (env, runtimeClass, " java_lang_System" , true );
785
- java_System_identityHashCode = env->GetStaticMethodID (java_System, " identityHashCode" , " (Ljava/lang/Object;)I" );
786
-
787
- return 1 ;
788
- }
789
-
790
775
force_inline void
791
776
MonodroidRuntime::lookup_bridge_info (MonoClass *klass, const OSBridge::MonoJavaGCBridgeType *type, OSBridge::MonoJavaGCBridgeInfo *info)
792
777
{
@@ -851,7 +836,6 @@ MonodroidRuntime::init_android_runtime (JNIEnv *env, jclass runtimeClass, jobjec
851
836
init.logCategories = log_categories;
852
837
init.version = env->GetVersion ();
853
838
init.androidSdkVersion = android_api_level;
854
- init.localRefsAreIndirect = LocalRefsAreIndirect (env, runtimeClass, init.androidSdkVersion );
855
839
init.isRunningOnDesktop = is_running_on_desktop ? 1 : 0 ;
856
840
init.brokenExceptionTransitions = application_config.broken_exception_transitions ? 1 : 0 ;
857
841
init.packageNamingPolicy = static_cast <int >(application_config.package_naming_policy );
@@ -860,6 +844,9 @@ MonodroidRuntime::init_android_runtime (JNIEnv *env, jclass runtimeClass, jobjec
860
844
init.jniRemappingInUse = application_config.jni_remapping_replacement_type_count > 0 || application_config.jni_remapping_replacement_method_index_entry_count > 0 ;
861
845
init.marshalMethodsEnabled = application_config.marshal_methods_enabled ;
862
846
847
+ java_System = RuntimeUtil::get_class_from_runtime_field (env, runtimeClass, " java_lang_System" , true );
848
+ java_System_identityHashCode = env->GetStaticMethodID (java_System, " identityHashCode" , " (Ljava/lang/Object;)I" );
849
+
863
850
// GC threshold is 90% of the max GREF count
864
851
init.grefGcThreshold = static_cast <int >(AndroidSystem::get_gref_gc_threshold ());
865
852
0 commit comments