Skip to content

Commit 6feb4eb

Browse files
committed
doc(ffi): Add some doc comments for android_platform.rs
1 parent 29298ab commit 6feb4eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bindings/matrix-sdk-ffi/src/platform/android_platform.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ use jni::{
66
};
77
use tracing::debug;
88

9-
pub(crate) static ANDROID_JVM: once_cell::sync::OnceCell<jni::JavaVM> =
10-
once_cell::sync::OnceCell::new();
9+
static ANDROID_JVM: once_cell::sync::OnceCell<jni::JavaVM> = once_cell::sync::OnceCell::new();
1110

11+
/// Initialize the platform support for Android targets.
12+
///
13+
/// This includes setting up `rustls-platform-verifier`.
1214
pub(crate) fn init() {
1315
debug!("Initializing Android platform support");
1416

@@ -77,6 +79,7 @@ fn init_rustls_platform_verifier(env: &mut jni::JNIEnv<'_>) -> jni::errors::Resu
7779
Ok(rustls_platform_verifier::android::init_hosted(env, context)?)
7880
}
7981

82+
/// Attach the current thread to a JVM one.
8083
pub(crate) fn android_attach_current_thread_permanently(
8184
) -> jni::errors::Result<jni::JNIEnv<'static>> {
8285
ANDROID_JVM

0 commit comments

Comments
 (0)