From e498337b3acb2cc7e0d37a5f6ad084a838928a05 Mon Sep 17 00:00:00 2001 From: Yiming Lv <2909256199@qq.com> Date: Wed, 27 Aug 2025 13:04:50 +0000 Subject: [PATCH] add signalhub controll 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 ef0f3bf2..606f8625 100644 --- a/frameworks/inner/src/bluetooth_host.cpp +++ b/frameworks/inner/src/bluetooth_host.cpp @@ -683,7 +683,8 @@ int BluetoothHost::RestrictBluetooth() 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 31041701..95d319c4 100644 --- a/interfaces/inner_api/include/bluetooth_def.h +++ b/interfaces/inner_api/include/bluetooth_def.h @@ -1678,6 +1678,7 @@ struct SensingInfo { enum class SATELLITE_CONTROL_MODE { ANTENNA = 0, BLUETOOTH_SWITCH = 1, + SIGNALHUB_MAC_SWITCH = 2, }; struct TrustPairDeviceParam { -- Gitee