From eacb82fbd21df3f64ebca055fab898b0edadfbf3 Mon Sep 17 00:00:00 2001 From: Axi_Beft Date: Sat, 28 Jun 2025 10:36:48 +0800 Subject: [PATCH] fix GetSilentProxy Signed-off-by: Axi_Beft --- .../data_share/data_share_service_impl.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/services/distributeddataservice/service/data_share/data_share_service_impl.cpp b/services/distributeddataservice/service/data_share/data_share_service_impl.cpp index 3c1a3ded3..fbe50fbd0 100644 --- a/services/distributeddataservice/service/data_share/data_share_service_impl.cpp +++ b/services/distributeddataservice/service/data_share/data_share_service_impl.cpp @@ -1215,6 +1215,21 @@ int32_t DataShareServiceImpl::GetBMSAndMetaDataStatus(const std::string &uri, co errCode, URIUtils::Anonymous(calledInfo.uri).c_str()); return errCode; } + DataShareDbConfig dbConfig; + DataShareDbConfig::DbConfig dbArg; + dbArg.uri = calledInfo.uri; + dbArg.bundleName = calledInfo.bundleName; + dbArg.storeName = calledInfo.storeName; + dbArg.userId = calledInfo.singleton ? 0 : calledInfo.visitedUserId; + dbArg.hasExtension = calledInfo.hasExtension; + dbArg.appIndex = calledInfo.appIndex; + auto [code, metaData] = dbConfig.GetMetaData(dbArg); + if (code != E_OK) { + ZLOGE("Get metaData fail,bundleName:%{public}s,tableName:%{public}s,tokenId:0x%{public}x, uri:%{public}s", + calledInfo.bundleName.c_str(), DistributedData::Anonymous::Change(calledInfo.tableName).c_str(), tokenId, + URIUtils::Anonymous(calledInfo.uri).c_str()); + return E_METADATA_NOT_EXISTS; + } return E_OK; } -- Gitee