diff --git a/services/service/src/device_manager_service.cpp b/services/service/src/device_manager_service.cpp index 7bfe6eae19b402293096ce5437e810fa81055465..504ce2663d6e5b9599e9fecdef586febcfe6b5e3 100644 --- a/services/service/src/device_manager_service.cpp +++ b/services/service/src/device_manager_service.cpp @@ -2542,14 +2542,23 @@ void DeviceManagerService::HandleAccountLogout(int32_t userId, const std::string GetDevUdid(localUdidTemp, DEVICE_UUID_LENGTH); std::string localUdid = std::string(localUdidTemp); deviceMap = dmServiceImpl_->GetDeviceIdAndUserId(userId, accountId); + std::vector peerHOUdids; + GetHoOsTypeUdids(peerHOUdids); + std::vector dualPeerUdids; for (const auto &item : deviceMap) { + if (find(peerHOUdids.begin(), peerHOUdids.end(), item.first) != peerHOUdids.end()) { + LOGI("dualUdid: %{public}s", GetAnonyString(item.first).c_str()); + dualPeerUdids.emplace_back(item.first); + } peerUdids.emplace_back(item.first); } - if (!peerUdids.empty()) { + if (!dualPeerUdids.empty()) { //logout notify cast+ if (IsDMServiceAdapterResidentLoad()) { dmServiceImplExtResident_->AccountIdLogout(userId, accountId, peerUdids); } + } + if (!peerUdids.empty()) { char accountIdHash[DM_MAX_DEVICE_ID_LEN] = {0}; if (Crypto::GetAccountIdHash(accountId, reinterpret_cast(accountIdHash)) != DM_OK) { LOGE("GetAccountHash failed.");