From e53978803cd1f909c650d4e722ffda113f534aa7 Mon Sep 17 00:00:00 2001 From: wudj2110 Date: Fri, 13 Sep 2024 01:20:19 +0800 Subject: [PATCH] added function and capability value for querying screen status directly, and added ut code Signed-off-by: wudj2110 --- .../common/bus_center/bus_center_adapter.gni | 1 + .../common_event/lnn_common_event_monitor.cpp | 13 +++++++ .../include/lnn_event_monitor_impl.h | 1 + bundle.json | 3 +- core/bus_center/ipc/mini/lnn_bus_center_ipc.c | 9 +++++ .../ipc/small/src/lnn_bus_center_ipc.c | 9 +++++ .../heartbeat/include/lnn_heartbeat_utils.h | 1 + .../lnn/net_ledger/common/src/lnn_node_info.c | 1 + .../src/lnn_distributed_net_ledger_manager.c | 36 +++++++++++++++++-- .../local_ledger/src/lnn_local_net_ledger.c | 2 +- .../bus_center/service/src/bus_center_event.c | 2 +- .../manager/src/client_bus_center_manager.c | 17 +++++---- .../lnn/net_ledger/lnn_local_ledger_test.cpp | 25 +++++++++++++ .../unittest/bus_center_sdk_test.cpp | 22 ++++++++++++ .../client_bus_center_manager_test.cpp | 29 +++++++++++++++ 15 files changed, 159 insertions(+), 12 deletions(-) diff --git a/adapter/common/bus_center/bus_center_adapter.gni b/adapter/common/bus_center/bus_center_adapter.gni index a9de0c75f..1cdb681cb 100644 --- a/adapter/common/bus_center/bus_center_adapter.gni +++ b/adapter/common/bus_center/bus_center_adapter.gni @@ -106,6 +106,7 @@ if (defined(ohos_lite)) { "common_event_service:cesfwk_innerkits", "init:libbeget_proxy", "netmanager_base:net_conn_manager_if", + "power_manager:powermgr_client", ] } else { bus_center_adapter_src += [ diff --git a/adapter/common/bus_center/common_event/lnn_common_event_monitor.cpp b/adapter/common/bus_center/common_event/lnn_common_event_monitor.cpp index 871d012bf..1f5befec5 100644 --- a/adapter/common/bus_center/common_event/lnn_common_event_monitor.cpp +++ b/adapter/common/bus_center/common_event/lnn_common_event_monitor.cpp @@ -29,6 +29,7 @@ #include "lnn_heartbeat_strategy.h" #include "want.h" +#include "power_mgr_client.h" #include "softbus_adapter_mem.h" #include "softbus_errcode.h" @@ -111,6 +112,17 @@ int32_t SubscribeEvent::SubscribeCommonEvent() } // namespace EventFwk } // namespace OHOS +bool LnnQueryLocalScreenStatusOnce(bool notify) +{ + bool isScreenOn = OHOS::PowerMgr::PowerMgrClient::GetInstance().IsScreenOn(true); + LNN_LOGI(LNN_EVENT, "query screen status is %{public}s", isScreenOn ? "on" : "off"); + if (notify) { + SoftBusScreenState screenState = isScreenOn ? SOFTBUS_SCREEN_ON : SOFTBUS_SCREEN_OFF; + LnnNotifyScreenStateChangeEvent(screenState); + } + return isScreenOn; +} + static void LnnSubscribeCommonEvent(void *para) { (void)para; @@ -139,6 +151,7 @@ static void LnnSubscribeCommonEvent(void *para) } } delete subscriberPtr; + (void)LnnQueryLocalScreenStatusOnce(true); } int32_t LnnInitCommonEventMonitorImpl(void) diff --git a/adapter/common/bus_center/include/lnn_event_monitor_impl.h b/adapter/common/bus_center/include/lnn_event_monitor_impl.h index dbc556448..f5e3b3a8e 100644 --- a/adapter/common/bus_center/include/lnn_event_monitor_impl.h +++ b/adapter/common/bus_center/include/lnn_event_monitor_impl.h @@ -59,6 +59,7 @@ void LnnDeInitNetlinkMonitorImpl(void); int32_t LnnSubscribeAccountBootEvent(AccountEventHandle handle); +bool LnnQueryLocalScreenStatusOnce(bool notify); #ifdef __cplusplus } #endif diff --git a/bundle.json b/bundle.json index 4b3d2d194..b8cf932a1 100644 --- a/bundle.json +++ b/bundle.json @@ -84,7 +84,8 @@ "mbedtls", "libcoap", "zlib", - "libnl" + "libnl", + "power_manager" ], "third_party": [ "cJSON", diff --git a/core/bus_center/ipc/mini/lnn_bus_center_ipc.c b/core/bus_center/ipc/mini/lnn_bus_center_ipc.c index 0afee4294..af1226e38 100644 --- a/core/bus_center/ipc/mini/lnn_bus_center_ipc.c +++ b/core/bus_center/ipc/mini/lnn_bus_center_ipc.c @@ -185,6 +185,15 @@ int32_t LnnIpcNotifyBasicInfoChanged(void *info, uint32_t infoTypeLen, int32_t t return LnnOnNodeBasicInfoChanged("", info, type); } +int32_t LnnIpcNotifyNodeStatusChanged(void *info, uint32_t infoTypeLen, int32_t type) +{ + (void)info; + (void)infoTypeLen; + (void)type; + LNN_LOGI(LNN_EVENT, "not implement"); + return SOFTBUS_OK; +} + int32_t LnnIpcLocalNetworkIdChanged(void) { LNN_LOGI(LNN_EVENT, "not implement"); diff --git a/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c b/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c index 785389428..456103ba8 100644 --- a/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c +++ b/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c @@ -444,6 +444,15 @@ int32_t LnnIpcNotifyBasicInfoChanged(void *info, uint32_t infoTypeLen, int32_t t return ClinetOnNodeBasicInfoChanged(info, infoTypeLen, type); } +int32_t LnnIpcNotifyNodeStatusChanged(void *info, uint32_t infoTypeLen, int32_t type) +{ + (void)info; + (void)infoTypeLen; + (void)type; + LNN_LOGI(LNN_EVENT, "not implement"); + return SOFTBUS_OK; +} + int32_t LnnIpcLocalNetworkIdChanged(void) { LNN_LOGI(LNN_EVENT, "not implement"); diff --git a/core/bus_center/lnn/lane_hub/heartbeat/include/lnn_heartbeat_utils.h b/core/bus_center/lnn/lane_hub/heartbeat/include/lnn_heartbeat_utils.h index 1142c52d5..7cfa6926f 100644 --- a/core/bus_center/lnn/lane_hub/heartbeat/include/lnn_heartbeat_utils.h +++ b/core/bus_center/lnn/lane_hub/heartbeat/include/lnn_heartbeat_utils.h @@ -130,6 +130,7 @@ typedef struct { typedef enum { BIT_SUPPORT_DIRECT_TRIGGER = 0, + BIT_SUPPORT_SCREEN_STATUS = 0, } HeartbeatCapability; #define STATE_VERSION_INVALID (-1) diff --git a/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c b/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c index 3c186eb32..2bee49343 100644 --- a/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c +++ b/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c @@ -630,5 +630,6 @@ int32_t LnnSetScreenStatus(NodeInfo *info, bool isScreenOn) return SOFTBUS_INVALID_PARAM; } info->isScreenOn = isScreenOn; + LNN_LOGI(LNN_LEDGER, "set local screen status to %{public}s", isScreenOn ? "on" : "off"); return SOFTBUS_OK; } \ No newline at end of file diff --git a/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c b/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c index c5a6843f4..bb72a725a 100644 --- a/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c +++ b/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c @@ -56,6 +56,7 @@ static int32_t DlGetDeviceUuid(const char *networkId, bool checkOnline, void *bu static int32_t DlGetDeviceOfflineCode(const char *networkId, bool checkOnline, void *buf, uint32_t len) { + (void)checkOnline; NodeInfo *info = NULL; RETURN_IF_GET_NODE_VALID(networkId, buf, info); if (memcpy_s(buf, len, info->offlineCode, OFFLINE_CODE_BYTE_SIZE) != EOK) { @@ -116,6 +117,7 @@ static int32_t DlGetDeviceType(const char *networkId, bool checkOnline, void *bu static int32_t DlGetDeviceTypeId(const char *networkId, bool checkOnline, void *buf, uint32_t len) { (void)checkOnline; + (void)len; NodeInfo *info = NULL; RETURN_IF_GET_NODE_VALID(networkId, buf, info); *((int32_t *)buf) = info->deviceInfo.deviceTypeId; @@ -317,6 +319,14 @@ void LnnUpdateNodeBleMac(const char *networkId, char *bleMac, uint32_t len) SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); } +int32_t IsNodeInfoScreenStatusSupport(const NodeInfo *info) +{ + if (!LnnIsSupportHeartbeatCap(info->heartbeatCapacity, BIT_SUPPORT_SCREEN_STATUS)) { + return SOFTBUS_NETWORK_NOT_SUPPORT; + } + return SOFTBUS_OK; +} + bool LnnSetRemoteScreenStatusInfo(const char *networkId, bool isScreenOn) { if (networkId == NULL) { @@ -327,14 +337,26 @@ bool LnnSetRemoteScreenStatusInfo(const char *networkId, bool isScreenOn) LNN_LOGE(LNN_LEDGER, "lock mutex fail!"); return false; } + char *anonyNetworkId = NULL; + Anonymize(networkId, &anonyNetworkId); NodeInfo *info = LnnGetNodeInfoById(networkId, CATEGORY_NETWORK_ID); if (info == NULL) { - LNN_LOGE(LNN_LEDGER, "get node info fail."); + LNN_LOGE(LNN_LEDGER, "networkId=%{public}s, get node info fail.", anonyNetworkId); SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); + AnonymizeFree(anonyNetworkId); return false; } + if (IsNodeInfoScreenStatusSupport(info) != SOFTBUS_OK) { + LNN_LOGE(LNN_LEDGER, "networkId=%{public}s, node screen status is not supported", anonyNetworkId); + SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); + AnonymizeFree(anonyNetworkId); + return false; + } + info->isScreenOn = isScreenOn; + LNN_LOGI(LNN_LEDGER, "set %{public}s screen status to %{public}s", anonyNetworkId, isScreenOn ? "on" : "off"); SoftBusMutexUnlock(&LnnGetDistributedNetLedger()->lock); + AnonymizeFree(anonyNetworkId); return true; } @@ -656,10 +678,20 @@ static int32_t DlGetNodeScreenOnFlag(const char *networkId, bool checkOnline, vo return SOFTBUS_INVALID_PARAM; } RETURN_IF_GET_NODE_VALID(networkId, buf, info); + char *anonyNetworkId = NULL; + Anonymize(networkId, &anonyNetworkId); + int32_t ret = IsNodeInfoScreenStatusSupport(info); + if (ret != SOFTBUS_OK) { + LNN_LOGI(LNN_LEDGER, "%{public}s get node screen not support", anonyNetworkId); + AnonymizeFree(anonyNetworkId); + return ret; + } if (checkOnline && !LnnIsNodeOnline(info) && !IsMetaNode(info)) { - LNN_LOGE(LNN_LEDGER, "node is offline"); + LNN_LOGE(LNN_LEDGER, "%{public}s node is offline", anonyNetworkId); + AnonymizeFree(anonyNetworkId); return SOFTBUS_NETWORK_NODE_OFFLINE; } + AnonymizeFree(anonyNetworkId); *((bool *)buf) = info->isScreenOn; return SOFTBUS_OK; } diff --git a/core/bus_center/lnn/net_ledger/local_ledger/src/lnn_local_net_ledger.c b/core/bus_center/lnn/net_ledger/local_ledger/src/lnn_local_net_ledger.c index c0b066900..c00dd64ce 100644 --- a/core/bus_center/lnn/net_ledger/local_ledger/src/lnn_local_net_ledger.c +++ b/core/bus_center/lnn/net_ledger/local_ledger/src/lnn_local_net_ledger.c @@ -47,7 +47,7 @@ #define SOFTBUS_BUSCENTER_DUMP_LOCALDEVICEINFO "local_device_info" #define ALL_GROUP_TYPE 0xF #define MAX_STATE_VERSION 0xFF -#define DEFAULT_SUPPORT_HBCAPACITY 0x1 +#define DEFAULT_SUPPORT_HBCAPACITY 0x3 #define DEFAULT_CONN_SUB_FEATURE 3 #define CACHE_KEY_LENGTH 32 #define STATE_VERSION_VALUE_LENGTH 8 diff --git a/core/bus_center/service/src/bus_center_event.c b/core/bus_center/service/src/bus_center_event.c index e0a407a84..89741c5d6 100644 --- a/core/bus_center/service/src/bus_center_event.c +++ b/core/bus_center/service/src/bus_center_event.c @@ -121,7 +121,7 @@ static void HandleNodeBasicInfoChangedMessage(SoftBusMessage *msg) static void HandleNodeStatusChangedMessage(SoftBusMessage *msg) { if (msg->obj == NULL) { - LNN_LOGE(LNN_EVENT, "invalid node basic info message"); + LNN_LOGE(LNN_EVENT, "invalid node status message"); return; } int32_t type = (int32_t)msg->arg1; diff --git a/sdk/bus_center/manager/src/client_bus_center_manager.c b/sdk/bus_center/manager/src/client_bus_center_manager.c index 1788d8a5e..1cb01863a 100644 --- a/sdk/bus_center/manager/src/client_bus_center_manager.c +++ b/sdk/bus_center/manager/src/client_bus_center_manager.c @@ -18,6 +18,7 @@ #include #include +#include "anonymizer.h" #include "bus_center_server_proxy.h" #include "common_list.h" #include "lnn_log.h" @@ -1186,14 +1187,13 @@ int32_t LnnOnNodeBasicInfoChanged(const char *pkgName, void *info, int32_t type) int32_t LnnOnNodeStatusChanged(const char *pkgName, void *info, int32_t type) { + if (pkgName == NULL || info == NULL) { + LNN_LOGE(LNN_STATE, "pkgName or info is null"); + return SOFTBUS_INVALID_PARAM; + } NodeStateCallbackItem *item = NULL; NodeStatus *nodeStatus = (NodeStatus *)info; ListNode dupList; - - if (nodeStatus == NULL || pkgName == NULL) { - LNN_LOGE(LNN_STATE, "info or pkgName is null"); - return SOFTBUS_INVALID_PARAM; - } if (!g_busCenterClient.isInit) { LNN_LOGE(LNN_STATE, "buscenter client not init"); return SOFTBUS_NO_INIT; @@ -1213,16 +1213,19 @@ int32_t LnnOnNodeStatusChanged(const char *pkgName, void *info, int32_t type) if (SoftBusMutexUnlock(&g_busCenterClient.lock) != SOFTBUS_OK) { LNN_LOGE(LNN_STATE, "unlock node status cb list in notify"); } - LNN_LOGI(LNN_STATE, "LnnOnNodeStatusChanged, pkgName=%{public}s, type=%{public}d, screen=%{public}d", pkgName, + char *anonyPkgName = NULL; + Anonymize(pkgName, &anonyPkgName); + LNN_LOGI(LNN_STATE, "LnnOnNodeStatusChanged, pkgName=%{public}s, type=%{public}d, screen=%{public}d", anonyPkgName, type, nodeStatus->reserved[0]); LIST_FOR_EACH_ENTRY(item, &dupList, NodeStateCallbackItem, node) { if (((strcmp(item->pkgName, pkgName) == 0) || (strlen(pkgName) == 0)) && (item->cb.events & EVENT_NODE_STATUS_CHANGED) != 0 && item->cb.onNodeStatusChanged != NULL) { LNN_LOGI(LNN_STATE, "LnnOnNodeStatusChanged, pkgName=%{public}s, type=%{public}d, screen=%{public}d", - pkgName, type, nodeStatus->reserved[0]); + anonyPkgName, type, nodeStatus->reserved[0]); item->cb.onNodeStatusChanged((NodeStatusType)type, nodeStatus); } } + AnonymizeFree(anonyPkgName); ClearNodeStateCbList(&dupList); return SOFTBUS_OK; } diff --git a/tests/core/bus_center/lnn/net_ledger/lnn_local_ledger_test.cpp b/tests/core/bus_center/lnn/net_ledger/lnn_local_ledger_test.cpp index 963e7c8cd..e17f55883 100644 --- a/tests/core/bus_center/lnn/net_ledger/lnn_local_ledger_test.cpp +++ b/tests/core/bus_center/lnn/net_ledger/lnn_local_ledger_test.cpp @@ -92,6 +92,7 @@ static void LocalLedgerKeyTestPackaged(void) EXPECT_EQ(LlUpdateStaticCapLen(nullptr), SOFTBUS_INVALID_PARAM); EXPECT_EQ(LlUpdateAccount(nullptr), SOFTBUS_INVALID_PARAM); EXPECT_EQ(LlUpdateStaticCapability(nullptr), SOFTBUS_INVALID_PARAM); + EXPECT_EQ(LnnUpdateLocalScreenStatus(true), SOFTBUS_OK); } /* @@ -489,4 +490,28 @@ HWTEST_F(LNNLedgerMockTest, Local_Ledger_Key_Test_007, TestSize.Level1) SoftBusFree(buf); } +/* +* @tc.name: Local_Ledger_Key_Test_008 +* @tc.desc: local ledger key test +* @tc.type: FUNC +* @tc.require: +*/ +HWTEST_F(LNNLedgerMockTest, Local_Ledger_Key_Test_008, TestSize.Level1) +{ + LocalLedgerDepsInterfaceMock localLedgerMock; + EXPECT_CALL(localLedgerMock, LnnGetNetCapabilty()).WillRepeatedly(Return(CAPABILTY)); + EXPECT_CALL(localLedgerMock, SoftBusGenerateRandomArray(_, _)).WillRepeatedly(Return(SOFTBUS_OK)); + EXPECT_CALL(localLedgerMock, LnnGetFeatureCapabilty()).WillRepeatedly(Return(FEATURE)); + EXPECT_CALL(localLedgerMock, GetCommonOsType(_)).WillRepeatedly(Return(SOFTBUS_OK)); + EXPECT_CALL(localLedgerMock, GetCommonOsVersion(_, _)).WillRepeatedly(Return(SOFTBUS_OK)); + EXPECT_CALL(localLedgerMock, + GetCommonDevInfo(_, NotNull(), _)).WillRepeatedly(localLedgerMock.LedgerGetCommonDevInfo); + EXPECT_CALL(localLedgerMock, LnnInitLocalP2pInfo(_)) + .WillOnce(Return(SOFTBUS_OK)) + .WillRepeatedly(Return(SOFTBUS_ERR)); + EXPECT_EQ(LnnInitLocalLedger(), SOFTBUS_OK); + EXPECT_EQ(LnnUpdateLocalScreenStatus(true), SOFTBUS_OK); + EXPECT_EQ(LnnUpdateLocalScreenStatus(false), SOFTBUS_OK); + LnnDeinitLocalLedger(); +} } // namespace OHOS diff --git a/tests/sdk/bus_center/unittest/bus_center_sdk_test.cpp b/tests/sdk/bus_center/unittest/bus_center_sdk_test.cpp index 230b28852..0fb2ca78b 100644 --- a/tests/sdk/bus_center/unittest/bus_center_sdk_test.cpp +++ b/tests/sdk/bus_center/unittest/bus_center_sdk_test.cpp @@ -336,6 +336,28 @@ HWTEST_F(BusCenterSdkTest, BUS_CENTER_SDK_GET_NODE_KEY_INFO_Test_001, TestSize.L FreeNodeInfo(remoteNodeInfo); } +/* +* @tc.name: BUS_CENTER_SDK_GET_NODE_KEY_INFO_Test_002 +* @tc.desc: get node key info(screen status) interface test +* @tc.type: FUNC +* @tc.require: I5I7B9 +*/ +HWTEST_F(BusCenterSdkTest, BUS_CENTER_SDK_GET_NODE_KEY_INFO_Test_002, TestSize.Level0) +{ + NodeBasicInfo info; + NodeBasicInfo *remoteNodeInfo = nullptr; + int32_t infoNum = 0; + bool isScreenOn = false; + (void)memset_s(&info, sizeof(NodeBasicInfo), 0, sizeof(NodeBasicInfo)); + EXPECT_TRUE(GetLocalNodeDeviceInfo(TEST_PKG_NAME, &info) == SOFTBUS_OK); + EXPECT_TRUE(GetAllNodeDeviceInfo(TEST_PKG_NAME, &remoteNodeInfo, &infoNum) == SOFTBUS_OK); + for (int32_t i = 0; i < infoNum; i++) { + EXPECT_TRUE(GetNodeKeyInfo(TEST_PKG_NAME, (remoteNodeInfo + i)->networkId, NODE_KEY_DEVICE_SCREEN_STATUS, + (uint8_t*)&isScreenOn, DATA_DEVICE_SCREEN_STATUS_LEN) == SOFTBUS_OK); + } + FreeNodeInfo(remoteNodeInfo); +} + /* * @tc.name: BUS_CENTER_SDK_START_TIME_SYNC_Test_001 * @tc.desc: start time sync interface test diff --git a/tests/sdk/bus_center/unittest/client_bus_center_manager_test.cpp b/tests/sdk/bus_center/unittest/client_bus_center_manager_test.cpp index 528278718..b1177e458 100644 --- a/tests/sdk/bus_center/unittest/client_bus_center_manager_test.cpp +++ b/tests/sdk/bus_center/unittest/client_bus_center_manager_test.cpp @@ -583,6 +583,35 @@ HWTEST_F(ClientBusCentManagerTest, LNN_ON_NODE_BASICINFO_CHANGED_Test_001, TestS BusCenterClientDeinit(); } +/* +* @tc.name: LNN_ON_NODE_STATUS_CHANGED_Test_001 +* @tc.desc: lnn on node status changed test +* @tc.type: FUNC +* @tc.require: +*/ +HWTEST_F(ClientBusCentManagerTest, LNN_ON_NODE_STATUS_CHANGED_Test_001, TestSize.Level1) +{ + INodeStateCb callBcak; + (void)memset_s(&callBcak, sizeof(INodeStateCb), 0, sizeof(INodeStateCb)); + callBcak.events = EVENT_NODE_STATUS_CHANGED; + callBcak.onNodeStatusChanged = OnNodeStatusChangedCb; + NodeStatus info; + ClientBusCenterManagerInterfaceMock busCentManagerMock; + EXPECT_CALL(busCentManagerMock, SoftbusGetConfig(_, _, _)).WillRepeatedly(Return(SOFTBUS_OK)); + EXPECT_TRUE(LnnOnNodeStatusChanged(nullptr, reinterpret_cast(&info), TYPE_SCREEN_STATUS) == + SOFTBUS_INVALID_PARAM); + EXPECT_TRUE(LnnOnNodeStatusChanged("", nullptr, TYPE_STATUS_MAX + 1) == SOFTBUS_INVALID_PARAM); + EXPECT_CALL(busCentManagerMock, BusCenterServerProxyInit()).WillRepeatedly(Return(SOFTBUS_OK)); + EXPECT_CALL(busCentManagerMock, BusCenterServerProxyDeInit()).WillRepeatedly(Return()); + EXPECT_TRUE(BusCenterClientInit() == SOFTBUS_OK); + EXPECT_TRUE(RegNodeDeviceStateCbInner(nullptr, &callBcak) == SOFTBUS_INVALID_PARAM); + EXPECT_TRUE(RegNodeDeviceStateCbInner(PKGNAME, &callBcak) == SOFTBUS_OK); + EXPECT_TRUE(LnnOnNodeStatusChanged("", reinterpret_cast(&info), TYPE_STATUS_MAX + 1) == + SOFTBUS_INVALID_PARAM); + EXPECT_TRUE(LnnOnNodeStatusChanged("", reinterpret_cast(&info), TYPE_SCREEN_STATUS) == SOFTBUS_OK); + BusCenterClientDeinit(); +} + static void OnTimeSyncResultCb(const TimeSyncResultInfo *info, int32_t retCode) { (void)info;