Open
Conversation
bdbfc4c to
8ab73d0
Compare
8ab73d0 to
8f9b490
Compare
3525414 to
a7a4f64
Compare
14d41bd to
aaf0e8b
Compare
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.
simlay
reviewed
Feb 18, 2026
Comment on lines
+31
to
+32
| jni = "0.22" | ||
| jni-sys = "0.4.1" |
There was a problem hiding this comment.
Just curious, is jni-sys needed here? It seems that all the imports for jni_sys:: were changed to jni::sys:: as it's re-exported
Member
Author
There was a problem hiding this comment.
yeah, I think you're probably right and this explicit dep can be removed now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a common
init_android_main_thread()utility that's called by both backends in order to get theClassLoaderfrom theActivityand associate that with the thread viaJThread::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 theKeyCharacterMapandInputDeviceJava SDK API bindings insrc/input/sdk.rswhich is a nice simplification.