diff --git a/services/distributedhardwarefwkservice/src/distributed_hardware_manager_factory.cpp b/services/distributedhardwarefwkservice/src/distributed_hardware_manager_factory.cpp index 7f801b21377b3adb12d167065fd2e11d1fc7d760..1dcbedf9b39b014b5c6c8856344e1a1a19541187 100644 --- a/services/distributedhardwarefwkservice/src/distributed_hardware_manager_factory.cpp +++ b/services/distributedhardwarefwkservice/src/distributed_hardware_manager_factory.cpp @@ -17,6 +17,7 @@ #include #include +#include #include "anonymous_string.h" #include "constants.h" @@ -84,7 +85,8 @@ void DistributedHardwareManagerFactory::CheckExitSAOrNot() const auto uuid = GetUUIDBySoftBus(networkId); DHLOGI("Send trusted device online, networkId = %s, uuid = %s", GetAnonyString(networkId).c_str(), GetAnonyString(uuid).c_str()); - SendOnLineEvent(networkId, uuid, deviceInfo.deviceTypeId); + std::thread(&DistributedHardwareManagerFactory::SendOnLineEvent, this, networkId, uuid, + deviceInfo.deviceTypeId).detach(); } }