mirror of
https://gitee.com/openharmony/distributeddatamgr_datamgr_service
synced 2024-11-23 06:50:35 +00:00
update
Signed-off-by: yangliu <yangliu178@huawei.com>
This commit is contained in:
parent
3a83392ed1
commit
636163358a
@ -59,7 +59,7 @@ using system_clock = std::chrono::system_clock;
|
||||
using DMAdapter = DistributedData::DeviceManagerAdapter;
|
||||
using DumpManager = OHOS::DistributedData::DumpManager;
|
||||
using CommContext = OHOS::DistributedData::CommunicatorContext;
|
||||
using SecretKeyMeta = DistributedData::SecretKeyMetaData;
|
||||
using SecretKeyMeta = DistributedData::SecretKeyMetaData;
|
||||
static constexpr const char *DEFAULT_USER_ID = "0";
|
||||
__attribute__((used)) KVDBServiceImpl::Factory KVDBServiceImpl::factory_;
|
||||
KVDBServiceImpl::Factory::Factory()
|
||||
@ -816,15 +816,7 @@ bool KVDBServiceImpl::IsTripleAutoLaunch(
|
||||
if (storeMeta.bundleName == Bootstrap::GetInstance().GetProcessLabel()) {
|
||||
param.userId = storeMeta.user;
|
||||
}
|
||||
option.schema = storeMeta.schema;
|
||||
option.createDirByStoreIdOnly = true;
|
||||
option.dataDir = storeMeta.dataDir;
|
||||
option.secOption = ConvertSecurity(storeMeta.securityLevel);
|
||||
option.isAutoSync = storeMeta.isAutoSync;
|
||||
option.syncDualTupleMode = true; // dual tuple flag
|
||||
param.appId = storeMeta.appId;
|
||||
param.storeId = storeMeta.storeId;
|
||||
param.option = option;
|
||||
SetAutoLaunchParam(option, param);
|
||||
isFindIdentifier = true;
|
||||
return isTripleIdentifierEqual;
|
||||
}
|
||||
@ -833,6 +825,19 @@ bool KVDBServiceImpl::IsTripleAutoLaunch(
|
||||
return false;
|
||||
}
|
||||
|
||||
void KVDBServiceImpl::SetAutoLaunchParam(DistributedDB::AutoLaunchOption &option, DistributedDB::AutoLaunchParam ¶m)
|
||||
{
|
||||
option.schema = storeMeta.schema;
|
||||
option.createDirByStoreIdOnly = true;
|
||||
option.dataDir = storeMeta.dataDir;
|
||||
option.secOption = ConvertSecurity(storeMeta.securityLevel);
|
||||
option.isAutoSync = storeMeta.isAutoSync;
|
||||
option.syncDualTupleMode = true; // dual tuple flag
|
||||
param.appId = storeMeta.appId;
|
||||
param.storeId = storeMeta.storeId;
|
||||
param.option = option;
|
||||
}
|
||||
|
||||
int32_t KVDBServiceImpl::DoTripleAutoLaunch(StoreMetaData &meta)
|
||||
{
|
||||
auto watchers = GetWatchers(meta.tokenId, meta.storeId);
|
||||
|
@ -156,6 +156,7 @@ private:
|
||||
StoreMetaData &meta, bool &isFindIdentifier);
|
||||
int32_t DoTripleAutoLaunch(StoreMetaData &meta);
|
||||
DistributedDB::SecurityOption ConvertSecurity(int securityLevel);
|
||||
void SetAutoLaunchParam(DistributedDB::AutoLaunchOption &option, DistributedDB::AutoLaunchParam ¶m);
|
||||
Status ConvertDbStatusNative(DBStatus status);
|
||||
static Factory factory_;
|
||||
ConcurrentMap<uint32_t, SyncAgent> syncAgents_;
|
||||
|
@ -295,7 +295,8 @@ int32_t ObjectServiceImpl::ObjectStatic::OnAppUninstall(const std::string &bundl
|
||||
return result;
|
||||
}
|
||||
|
||||
int32_t ObjectServiceImpl::ResolveAutoLaunch(const std::string &identifier, DistributedDB::AutoLaunchParam ¶m, bool &isFindIdentifier)
|
||||
int32_t ObjectServiceImpl::ResolveAutoLaunch(const std::string &identifier, DistributedDB::AutoLaunchParam ¶m,
|
||||
bool &isFindIdentifier)
|
||||
{
|
||||
ZLOGI("start, user:%{public}s appId:%{public}s storeId:%{public}s identifier:%{public}s", param.userId.c_str(),
|
||||
param.appId.c_str(), DistributedData::Anonymous::Change(param.storeId).c_str(),
|
||||
|
Loading…
Reference in New Issue
Block a user