()
| 2299 | |
| 2300 | #[cfg(target_os = "android")] |
| 2301 | pub(crate) unsafe fn get_get_classloader_method() -> errors::Result<jmethodID> { |
| 2302 | get_cached!( |
| 2303 | GET_CLASSLOADER_METHOD, |
| 2304 | { |
| 2305 | let env = get_thread_local_env()?; |
| 2306 | let cstr1 = utils::to_c_string("getClassLoader"); |
| 2307 | let cstr2 = utils::to_c_string("()Ljava/lang/ClassLoader;"); |
| 2308 | let j = unsafe { |
| 2309 | (opt_to_res(get_jni_get_method_id())?)(env, get_android_context_wrapper_class()?, cstr1, cstr2) |
| 2310 | }; |
| 2311 | utils::drop_c_string(cstr1); |
| 2312 | utils::drop_c_string(cstr2); |
| 2313 | j |
| 2314 | }, |
| 2315 | set_get_classloader_method |
| 2316 | ) |
| 2317 | } |
| 2318 | |
| 2319 | #[cfg(target_os = "android")] |
| 2320 | pub(crate) fn set_load_class_method(j: jmethodID) { |
no outgoing calls
no test coverage detected