Commit Graph

4 Commits

Author SHA1 Message Date
v-chenghuijin 5e83175f35 fix: prevent crash by ensuring non-null string for sched_note_printf
bug: v/84212

Rootcase: The lightweight sched_note_printf function in the NuttX backend does not
perform NULL safety checks for the %s format specifier. Passing a NULL pointer from
hsm_get_state_name leads to a NULL pointer dereference, triggering a data abort
exception on systems with memory protection (MMU/MPU) and causing a system crash.

Solution: This commit addresses the issue by modifying the HSM_SAFE_NAME macro to
use the ternary operator. It now explicitly returns the "None" string literal when
hsm_get_state_name returns NULL, guaranteeing that a valid, non-null C-string is always
passed to the logging function.

Signed-off-by: v-chenghuijin <v-chenghuijin@xiaomi.com>
2026-04-27 23:14:54 +08:00
Haishen Zhang 6ed1e5e080 Vela-Android: Porting Vela Bluetooth Framework Socket Client to Android x86_64
1. Port Vela Bluetooth Framework Socket Client onto Android.
2. For Socket Server, Service, SAL, we didn't port them onto Android.
3. For bttool, the function is not ready yet.
4. With this libbt-framework-client.so, we can start working on BTIF wrapper over Vela BT Framework Socket Client API.
5. And, we can also start working on bttool over Vela BT Framework Socket Client API later.

Signed-off-by: Haishen Zhang <zhanghaishen@xiaomi.com>
2026-04-20 14:51:00 +08:00
Haishen Zhang 19bc307ac2 Clang-format: Update format of all files based on new .clang-format
1. Update format of all files based on new .clang-format

Signed-off-by: Haishen Zhang <zhanghaishen@xiaomi.com>
2026-04-20 14:50:50 +08:00
fangzhenwei a493f47581 bluetooth framework re-implement base
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 14:49:51 +08:00