mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-04 05:47:26 +00:00
Avoid deprecated AttachConfig::name API
This was replaced by `AttachConfig::thread_name` in jni 0.22.2, which takes a `&JNIStr` and doesn't require an extra allocation for the name to be mutf8 encoded.
This commit is contained in:
@@ -886,7 +886,7 @@ fn rust_glue_entry(rust_glue: NativeActivityGlue, activity: *mut ndk_sys::ANativ
|
||||
// For compatibility we attach before calling the applications main function to
|
||||
// allow it to assume the thread is attached before making JNI calls.
|
||||
jvm.attach_current_thread_with_config(
|
||||
|| AttachConfig::new().name("android_main"),
|
||||
|| AttachConfig::new().thread_name(jni::jni_str!("android_main")),
|
||||
Some(16),
|
||||
|env| -> jni::errors::Result<()> {
|
||||
// SAFETY: We know jni_activity is a valid JNI global ref to an Activity instance
|
||||
|
||||
Reference in New Issue
Block a user