diff --git a/Cargo.toml b/Cargo.toml index aa896c26..512362c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,8 @@ exclude = [ "clients/android/native/vendor/ndk", ] -# ndk 0.9.0 verbatim from crates.io plus ONE visibility change: `MediaCodec::as_ptr` made public +# ndk 0.9.0 verbatim from crates.io plus ONE visibility change (and two warning fixes — an +# unnecessary `std::` qualification and a feature-gated `Result` import): `MediaCodec::as_ptr` made public # (upstream keeps it private and exposes no frame-rendered binding), so the Android client can # call `AMediaCodec_setOnFrameRenderedCallback` via ndk-sys for the HUD's `display` stage # (design/stats-unification.md). Drop the patch when upstream exposes the pointer or the callback. diff --git a/clients/android/native/vendor/ndk/src/input_queue.rs b/clients/android/native/vendor/ndk/src/input_queue.rs index 0fae5f11..6c96228d 100644 --- a/clients/android/native/vendor/ndk/src/input_queue.rs +++ b/clients/android/native/vendor/ndk/src/input_queue.rs @@ -130,7 +130,7 @@ impl InputQueue { looper.ptr().as_ptr(), id, None, - std::ptr::null_mut(), + ptr::null_mut(), ) } } diff --git a/clients/android/native/vendor/ndk/src/media/media_format.rs b/clients/android/native/vendor/ndk/src/media/media_format.rs index 4997d522..917faaa6 100644 --- a/clients/android/native/vendor/ndk/src/media/media_format.rs +++ b/clients/android/native/vendor/ndk/src/media/media_format.rs @@ -9,7 +9,11 @@ use std::{ slice, }; -use crate::media_error::{MediaError, Result}; +use crate::media_error::MediaError; +// `Result` is only referenced by the api-level-29 methods below; an ungated import warns +// (unused_imports) on every default-feature build. +#[cfg(feature = "api-level-29")] +use crate::media_error::Result; /// A native [`AMediaFormat *`] ///