mirror of
https://gitee.com/openharmony/deviceprofile_device_info_manager
synced 2025-02-17 06:08:26 +00:00
修改检视意见
Signed-off-by: wangzhaohao <wangzhaohao@huawei.com>
This commit is contained in:
parent
3400708b0b
commit
9411ebe867
@ -413,17 +413,13 @@ int32_t DeviceProfileManager::DeleteRemovedUserData(int32_t userId)
|
||||
ProfileUtils::GetAnonyString(localDeviceId).c_str(), getRet);
|
||||
return getRet;
|
||||
}
|
||||
if (allLocalEntries.empty()) {
|
||||
HILOGI("Local data is empty.");
|
||||
return DP_SUCCESS;
|
||||
}
|
||||
for (const auto& pair : allLocalEntries) {
|
||||
if (userId == ProfileUtils::GetUserIdFromDbKey(pair.first)) {
|
||||
keysToDelete.emplace_back(pair.first);
|
||||
}
|
||||
}
|
||||
if (keysToDelete.empty()) {
|
||||
HILOGI("user:{public}d has no multi-user data.");
|
||||
HILOGI("userId:%{public}d has no multi-user data.", userId);
|
||||
return DP_SUCCESS;
|
||||
}
|
||||
std::lock_guard<std::mutex> lock(dynamicStoreMutex_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user