From f4a6423c0f4891ca56831535fb10b8cf602d2d23 Mon Sep 17 00:00:00 2001 From: c00429280 Date: Mon, 7 Apr 2025 11:41:43 +0800 Subject: [PATCH] * avoid cloud dev when bluetooth off Signed-off-by: c00429280 --- frameworks/inner/src/bluetooth_host.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/frameworks/inner/src/bluetooth_host.cpp b/frameworks/inner/src/bluetooth_host.cpp index a8a24bd5..3fc0d0bf 100644 --- a/frameworks/inner/src/bluetooth_host.cpp +++ b/frameworks/inner/src/bluetooth_host.cpp @@ -1272,6 +1272,7 @@ void BluetoothHost::Close(void) int32_t BluetoothHost::UpdateCloudBluetoothDevice(const std::vector &cloudDevices) { + CHECK_AND_RETURN_LOG_RET(IS_BT_ENABLED(), BT_ERR_INVALID_STATE, "bluetooth is off."); HILOGI("[CLOUD_DEV] UpdateCloudBluetoothDevice enter"); sptr proxy = GetRemoteProxy(BLUETOOTH_HOST); CHECK_AND_RETURN_LOG_RET(proxy != nullptr, BT_ERR_UNAVAILABLE_PROXY, "pimpl or bluetooth host is nullptr"); -- Gitee