mirror of
https://gitee.com/openharmony/deviceprofile_device_info_manager
synced 2024-11-26 17:21:03 +00:00
commit
3f465427dc
@ -95,6 +95,7 @@ private:
|
||||
void NotifyNotOHBaseOnline(const DistributedHardware::DmDeviceInfo deviceInfo);
|
||||
void E2ESyncDynamicProfile(const DistributedHardware::DmDeviceInfo deviceInfo);
|
||||
void ClearDataWithPeerLogout(const std::string& peerUdid, const std::string& peerUuid);
|
||||
void FixDiffProfiles();
|
||||
bool isAdapterSoLoaded_ = false;
|
||||
std::mutex isAdapterLoadLock_;
|
||||
std::mutex dynamicStoreMutex_;
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
bool isP2p) = 0;
|
||||
virtual int32_t SyncProfile(const std::string& peerUdid, const std::string& peerNetworkId,
|
||||
const sptr<IRemoteObject> syncCb, bool isP2p) = 0;
|
||||
virtual int32_t FixDiffProfiles(const std::vector<std::string>& udidVtr) = 0;
|
||||
};
|
||||
using CreateDPSyncAdapterFuncPtr = IDPSyncAdapter *(*)(void);
|
||||
} // namespace DeviceProfile
|
||||
|
@ -978,6 +978,23 @@ void DeviceProfileManager::ClearDataWithPeerLogout(const std::string& peerUdid,
|
||||
HILOGE("RemoveDeviceData fail, peerUuid=%{public}s", ProfileUtils::GetAnonyString(peerUuid).c_str());
|
||||
return;
|
||||
}
|
||||
FixDiffProfiles();
|
||||
}
|
||||
|
||||
void DeviceProfileManager::FixDiffProfiles()
|
||||
{
|
||||
HILOGI("call");
|
||||
std::lock_guard<std::mutex> lock(isAdapterLoadLock_);
|
||||
if (dpSyncAdapter_ == nullptr) {
|
||||
HILOGE("dpSyncAdapter is nullptr!");
|
||||
return;
|
||||
}
|
||||
int32_t ret = dpSyncAdapter_->FixDiffProfiles({});
|
||||
if (ret!= DP_SUCCESS) {
|
||||
HILOGE("FixDiffProfiles fail! ret=%{public}d", ret);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
} // namespace DeviceProfile
|
||||
} // namespace OHOS
|
||||
|
Loading…
Reference in New Issue
Block a user