Skip to content

Update to jni 0.22 and jni-sys 0.4 - #202

Merged
rib merged 1 commit into
mainfrom
rib/pr/jni-0.22
Feb 20, 2026
Merged

Update to jni 0.22 and jni-sys 0.4#202
rib merged 1 commit into
mainfrom
rib/pr/jni-0.22

Conversation

@rib

@rib rib commented Aug 11, 2025

Copy link
Copy Markdown
Member

This adds a common init_android_main_thread() utility that's called by both backends in order to get the ClassLoader from the Activity and associate that with the thread via JThread::set_context_class_loader (which jni 0.22 can use automatically when loading classes).

This change notably starts to use the jni::bind_java_type! macro for the KeyCharacterMap and InputDevice Java SDK API bindings in src/input/sdk.rs which is a nice simplification.

@MarijnS95
MarijnS95 force-pushed the release-0.6 branch 2 times, most recently from bdbfc4c to 8ab73d0 Compare November 15, 2025 14:07
@rib
rib force-pushed the rib/pr/jni-0.22 branch 2 times, most recently from 3525414 to a7a4f64 Compare January 9, 2026 16:03
@rib
rib changed the base branch from release-0.6 to main January 9, 2026 16:05
@rib
rib force-pushed the rib/pr/jni-0.22 branch 5 times, most recently from 14d41bd to aaf0e8b Compare January 11, 2026 21:07
@rib
rib marked this pull request as ready for review February 18, 2026 01:19
Comment thread android-activity/Cargo.toml Outdated
This adds a common init_android_main_thread() utility that's called by
both backends in order to get the ClassLoader from the Activity and
associate that with the thread via `JThreadthread::set_context_class_loader`
(which jni 0.22 can use automatically when loading classes).

This change notably starts to use the `jni::bind_java_type!` macro for the
`KeyCharacterMap` and `InputDevice` Java SDK API bindings in
`src/input/sdk.rs` which is a nice simplification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants