fix(core): include led in BLE component conditionally
What changed, and why it matters
This is a minor build fix that makes a Bluetooth UI component only import LED-related code when the device actually has an RGB LED feature. It prevents compilation errors on devices without that hardware feature. There is no security issue here.
No security action needed. Treat as a normal build/maintenance fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit moves use crate::ui::led::{Effect, LedState} under a #[cfg(feature = "rgb_led")] conditional import in core/embed/rust/src/ui/component/ble.rs. This is a conditional compilation fix to avoid referencing LED types on builds where the rgb_led feature is disabled. No functional behavior changes for enabled builds; disabled builds now compile.
Changed components
core/embed/rust/src/ui/component/ble.rsInspect captured patch +3 / −1
diff --git a/core/embed/rust/src/ui/component/ble.rs b/core/embed/rust/src/ui/component/ble.rs
index 814381d1..7070cdcd 100644
--- a/core/embed/rust/src/ui/component/ble.rs
+++ b/core/embed/rust/src/ui/component/ble.rs
@@ -2,10 +2,12 @@ use crate::ui::{
component::{Component, Event, EventCtx},
event::BLEEvent,
geometry::Rect,
- led::{Effect, LedState},
shape::Renderer,
};
+#[cfg(feature = "rgb_led")]
+use crate::ui::led::{Effect, LedState};
+
pub enum BLEHandlerMode {
/// Advertising without whitelist started, waiting for some host to respond
WaitingForPairingRequest,
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.