From e22f16665ffd33d82bdf7567ed40b6d81d1bbd00 Mon Sep 17 00:00:00 2001 From: Yiming Lv <2909256199@qq.com> Date: Wed, 27 Aug 2025 09:30:20 +0000 Subject: [PATCH] add signalhub control mode Signed-off-by: Yiming Lv <2909256199@qq.com> --- frameworks/inner/src/bluetooth_host.cpp | 3 ++- interfaces/inner_api/include/bluetooth_def.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frameworks/inner/src/bluetooth_host.cpp b/frameworks/inner/src/bluetooth_host.cpp index aeb92f40..7dd77250 100644 --- a/frameworks/inner/src/bluetooth_host.cpp +++ b/frameworks/inner/src/bluetooth_host.cpp @@ -701,7 +701,8 @@ int BluetoothHost::RestrictBluetooth(std::string name) int BluetoothHost::SatelliteControl(int type, int state) { HILOGI("type: %{public}d, state: %{public}d", type, state); - if (type == static_cast(SATELLITE_CONTROL_MODE::ANTENNA)) { + if (type == static_cast(SATELLITE_CONTROL_MODE::ANTENNA) || + type == static_cast(SATELLITE_CONTROL_MODE::SIGNALHUB_MAC_SWITCH)) { CHECK_AND_RETURN_LOG_RET(IS_BT_ENABLED(), BT_ERR_INVALID_STATE, "bluetooth is off."); } else if (type == static_cast(SATELLITE_CONTROL_MODE::BLUETOOTH_SWITCH)) { pimpl->LoadBluetoothHostService(); diff --git a/interfaces/inner_api/include/bluetooth_def.h b/interfaces/inner_api/include/bluetooth_def.h index 6e31d242..f3debb73 100644 --- a/interfaces/inner_api/include/bluetooth_def.h +++ b/interfaces/inner_api/include/bluetooth_def.h @@ -1693,6 +1693,7 @@ struct SensingInfo { enum class SATELLITE_CONTROL_MODE { ANTENNA = 0, BLUETOOTH_SWITCH = 1, + SIGNALHUB_MAC_SWITCH = 2, }; struct TrustPairDeviceParam { -- Gitee