mirror of
https://gitee.com/openharmony/deviceprofile_device_info_manager
synced 2024-11-22 23:19:50 +00:00
update
Signed-off-by: zhanglei <zhanglei730@huawei.com>
This commit is contained in:
parent
8c0648660a
commit
b45551871e
79
.vscode/settings.json
vendored
Normal file
79
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"xstring": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"atomic": "cpp",
|
||||
"bit": "cpp",
|
||||
"bitset": "cpp",
|
||||
"cctype": "cpp",
|
||||
"charconv": "cpp",
|
||||
"chrono": "cpp",
|
||||
"cinttypes": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cmath": "cpp",
|
||||
"codecvt": "cpp",
|
||||
"compare": "cpp",
|
||||
"concepts": "cpp",
|
||||
"condition_variable": "cpp",
|
||||
"cstddef": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cstring": "cpp",
|
||||
"ctime": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"exception": "cpp",
|
||||
"format": "cpp",
|
||||
"forward_list": "cpp",
|
||||
"fstream": "cpp",
|
||||
"functional": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"iomanip": "cpp",
|
||||
"ios": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"iostream": "cpp",
|
||||
"istream": "cpp",
|
||||
"iterator": "cpp",
|
||||
"limits": "cpp",
|
||||
"list": "cpp",
|
||||
"locale": "cpp",
|
||||
"map": "cpp",
|
||||
"memory": "cpp",
|
||||
"mutex": "cpp",
|
||||
"new": "cpp",
|
||||
"optional": "cpp",
|
||||
"ostream": "cpp",
|
||||
"ratio": "cpp",
|
||||
"regex": "cpp",
|
||||
"set": "cpp",
|
||||
"shared_mutex": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"stop_token": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"string": "cpp",
|
||||
"system_error": "cpp",
|
||||
"thread": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"unordered_set": "cpp",
|
||||
"utility": "cpp",
|
||||
"vector": "cpp",
|
||||
"xfacet": "cpp",
|
||||
"xhash": "cpp",
|
||||
"xiosbase": "cpp",
|
||||
"xlocale": "cpp",
|
||||
"xlocbuf": "cpp",
|
||||
"xlocinfo": "cpp",
|
||||
"xlocmes": "cpp",
|
||||
"xlocmon": "cpp",
|
||||
"xlocnum": "cpp",
|
||||
"xloctime": "cpp",
|
||||
"xmemory": "cpp",
|
||||
"xtr1common": "cpp",
|
||||
"xtree": "cpp",
|
||||
"xutility": "cpp"
|
||||
}
|
||||
}
|
@ -269,6 +269,10 @@ int32_t DistributedDeviceProfileService::OnIdle(const SystemAbilityOnDemandReaso
|
||||
void DistributedDeviceProfileService::OnStop()
|
||||
{
|
||||
HILOGI("called");
|
||||
if (!DistributedDeviceProfile::DistributedDeviceProfileServiceNew::GetInstance().UnInit()) {
|
||||
HILOGE("UnInit failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bool DistributedDeviceProfileService::DoInit()
|
||||
|
@ -7,6 +7,7 @@
|
||||
"run-on-create": false,
|
||||
"distributed": true,
|
||||
"dump-level": 1,
|
||||
"recycle-strategy": "low-memory",
|
||||
"start-on-demand": {
|
||||
"deviceonline": [
|
||||
{
|
||||
|
@ -166,6 +166,7 @@ int32_t DistributedDeviceProfileServiceNew::UnInit()
|
||||
HILOGE("EventHandlerFactory UnInit failed");
|
||||
return DP_CACHE_UNINIT_FAIL;
|
||||
}
|
||||
DestroyUnloadHandler();
|
||||
HILOGI("init succeeded");
|
||||
return DP_SUCCESS;
|
||||
}
|
||||
|
@ -63,6 +63,10 @@ int32_t PermissionManager::Init()
|
||||
int32_t PermissionManager::UnInit()
|
||||
{
|
||||
HILOGI("UnInit");
|
||||
{
|
||||
std::lock_guard<std::mutex> lockGuard(permissionMutex_);
|
||||
permissionMap_.clear();
|
||||
}
|
||||
return DP_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,11 @@ int32_t SubscribeProfileManager::Init()
|
||||
int32_t SubscribeProfileManager::UnInit()
|
||||
{
|
||||
HILOGI("call!");
|
||||
{
|
||||
std::lock_guard<std::mutex> lockGuard(subscribeMutex_);
|
||||
subscribeInfoMap_.clear();
|
||||
}
|
||||
funcsMap_.clear();
|
||||
return DP_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,30 @@ int32_t ProfileCache::Init()
|
||||
int32_t ProfileCache::UnInit()
|
||||
{
|
||||
HILOGI("UnInit");
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(onlineDeviceLock_);
|
||||
onlineDevMap_.clear();
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(deviceProfileMutex_);
|
||||
deviceProfileMap_.clear();
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(serviceProfileMutex_);
|
||||
serviceProfileMap_.clear();
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(charProfileMutex_);
|
||||
charProfileMap_.clear();
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(staticCharProfileMutex_);
|
||||
staticCharProfileMap_.clear();
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(syncListenerMutex_);
|
||||
syncListenerMap_.clear();
|
||||
}
|
||||
return DP_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user