From 19fd3dd9cc980b47ebad38fd8527fcb521786d1e Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Thu, 9 Apr 2026 14:59:00 +0400 Subject: [PATCH] step C fix: ungate wzp_proto imports used by resolve_quality() on Android MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build #20 failed to compile on Android because I over-gated the wzp_proto imports to non-Android. resolve_quality() is compiled on every platform (it's outside the CallEngine impl) and references QualityProfile + CodecId — both platform-independent types from wzp_proto. Move those back to an unconditional import. tracing stays gated (only the desktop start() body logs; the Android stub is silent). Co-Authored-By: Claude Opus 4.6 (1M context) --- desktop/src-tauri/src/engine.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/desktop/src-tauri/src/engine.rs b/desktop/src-tauri/src/engine.rs index 6120d03..19df2fc 100644 --- a/desktop/src-tauri/src/engine.rs +++ b/desktop/src-tauri/src/engine.rs @@ -14,20 +14,24 @@ use std::sync::Arc; use std::time::Instant; use tokio::sync::Mutex; +// tracing is used heavily inside the desktop CallEngine::start body but never +// from the 6-line Android stub — keep it gated to avoid an unused_imports +// warning on Android. #[cfg(not(target_os = "android"))] use tracing::{error, info}; +// CPAL audio I/O is only available on desktop (wzp-client's `audio` feature). #[cfg(not(target_os = "android"))] use wzp_client::audio_io::{AudioCapture, AudioPlayback}; + +// call / CallEncoder / CallConfig are platform-independent (pure Rust codec +// plumbing) but we only use them from the non-Android CallEngine::start body. #[cfg(not(target_os = "android"))] use wzp_client::call::{CallConfig, CallEncoder}; -#[cfg(not(target_os = "android"))] -use wzp_proto::{CodecId, MediaTransport, QualityProfile}; -// On Android we still need MediaTransport (for transport.close()) and nothing -// else from wzp_proto — this keeps the struct/stop()/status() code compiling. -#[cfg(target_os = "android")] -use wzp_proto::MediaTransport; +// wzp_proto types are platform-independent and referenced from +// resolve_quality() which is compiled on every platform. +use wzp_proto::{CodecId, MediaTransport, QualityProfile}; const FRAME_SAMPLES_40MS: usize = 1920;