From b8bbf35e177a6cc9d88686f0fe34c337a3c0737b Mon Sep 17 00:00:00 2001
From: muyuying1 <muyuying1@huawei.com>
Date: Thu, 3 Aug 2023 16:14:52 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A3=81=E5=89=AAdatashare=E5=92=8Cability?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 bundle.json                                   |   5 +-
 .../distributeddatafwk/include/itypes_util.h  |  18 +-
 .../include/kvstore_datashare_bridge.h        |   4 +-
 .../distributeddatafwk/src/itypes_util.cpp    | 438 +++++++++---------
 .../distributeddatafwk/src/kv_utils.cpp       |   4 +-
 .../src/kvstore_datashare_bridge.cpp          |   2 +-
 .../distributeddatafwk/test/BUILD.gn          |  11 +-
 .../innerkitsimpl/kvdb/src/store_util.cpp     |   1 +
 frameworks/innerkitsimpl/kvdb/test/BUILD.gn   |   9 +-
 .../distributeddb/common/src/db_common.cpp    |   3 +
 .../common/src/platform_specific.cpp          |   2 +
 .../common/src/runtime_context_impl.cpp       |   1 +
 interfaces/innerkits/distributeddata/BUILD.gn |  18 +-
 .../distributeddata/include/kv_utils.h        | 170 +++----
 interfaces/jskits/distributeddata/BUILD.gn    |  14 +-
 interfaces/jskits/distributedkvstore/BUILD.gn |  18 +-
 .../innerkits/distributeddata/BUILD.gn        |   6 +-
 .../jskits/distributeddata/BUILD.gn           |   4 +-
 test/fuzztest/typesutil_fuzzer/BUILD.gn       |   6 +-
 19 files changed, 367 insertions(+), 367 deletions(-)

diff --git a/bundle.json b/bundle.json
index 29f486f..fe368b0 100644
--- a/bundle.json
+++ b/bundle.json
@@ -85,10 +85,7 @@
     "build": {
       "sub_component": [
         "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:build_module",
-        "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:build_module",
-        "//foundation/distributeddatamgr/kv_store/interfaces/jskits/distributeddata:build_module",
-        "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributeddata:build_module",
-        "//foundation/distributeddatamgr/kv_store/interfaces/jskits/distributedkvstore:build_module"
+        "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:build_module"
       ],
       "inner_kits": [
         {
diff --git a/frameworks/innerkitsimpl/distributeddatafwk/include/itypes_util.h b/frameworks/innerkitsimpl/distributeddatafwk/include/itypes_util.h
index fbf711b..bd0fbcf 100644
--- a/frameworks/innerkitsimpl/distributeddatafwk/include/itypes_util.h
+++ b/frameworks/innerkitsimpl/distributeddatafwk/include/itypes_util.h
@@ -19,8 +19,8 @@
 #include <memory>
 
 #include "change_notification.h"
-#include "datashare_predicates.h"
-#include "datashare_values_bucket.h"
+// #include "datashare_predicates.h"
+// #include "datashare_values_bucket.h"
 #include "kvdb_service.h"
 #include "message_parcel.h"
 #include "rdb_types.h"
@@ -86,13 +86,13 @@ public:
     API_EXPORT static bool Marshalling(const KVDBService::DevBrief &input, MessageParcel &data);
     API_EXPORT static bool Unmarshalling(KVDBService::DevBrief &output, MessageParcel &data);
 
-    API_EXPORT static bool Unmarshalling(DataShare::DataSharePredicates &predicates, MessageParcel &parcel);
-    API_EXPORT static bool Unmarshalling(DataShare::DataShareValuesBucket &valuesBucket, MessageParcel &parcel);
-    API_EXPORT static bool Unmarshalling(DataShare::OperationItem &operationItem, MessageParcel &parcel);
-    API_EXPORT static bool Unmarshalling(DataShare::DataSharePredicatesObject &predicatesObject, MessageParcel &parcel);
-    API_EXPORT static bool Unmarshalling(DataShare::DataSharePredicatesObjects &predicatesObject,
-        MessageParcel &parcel);
-    API_EXPORT static bool Unmarshalling(DataShare::DataShareValueObject &valueObject, MessageParcel &parcel);
+    // API_EXPORT static bool Unmarshalling(DataShare::DataSharePredicates &predicates, MessageParcel &parcel);
+    // API_EXPORT static bool Unmarshalling(DataShare::DataShareValuesBucket &valuesBucket, MessageParcel &parcel);
+    // API_EXPORT static bool Unmarshalling(DataShare::OperationItem &operationItem, MessageParcel &parcel);
+    // API_EXPORT static bool Unmarshalling(DataShare::DataSharePredicatesObject &predicatesObject, MessageParcel &parcel);
+    // API_EXPORT static bool Unmarshalling(DataShare::DataSharePredicatesObjects &predicatesObject,
+    //     MessageParcel &parcel);
+    // API_EXPORT static bool Unmarshalling(DataShare::DataShareValueObject &valueObject, MessageParcel &parcel);
 
     API_EXPORT static int64_t GetTotalSize(const std::vector<Entry> &entries);
     API_EXPORT static int64_t GetTotalSize(const std::vector<Key> &entries);
diff --git a/frameworks/innerkitsimpl/distributeddatafwk/include/kvstore_datashare_bridge.h b/frameworks/innerkitsimpl/distributeddatafwk/include/kvstore_datashare_bridge.h
index 9c32623..2f9cbf4 100644
--- a/frameworks/innerkitsimpl/distributeddatafwk/include/kvstore_datashare_bridge.h
+++ b/frameworks/innerkitsimpl/distributeddatafwk/include/kvstore_datashare_bridge.h
@@ -18,8 +18,8 @@
 
 #include "kvstore_result_set.h"
 #include "single_kvstore.h"
-#include "result_set_bridge.h"
-#include "datashare_errno.h"
+// #include "result_set_bridge.h"
+// #include "datashare_errno.h"
 
 namespace OHOS {
 namespace DistributedKv {
diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp
index 7c31775..ad68f37 100644
--- a/frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp
+++ b/frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp
@@ -485,225 +485,225 @@ bool ITypesUtil::Unmarshalling(sptr<IRemoteObject> &output, MessageParcel &data)
     return true;
 }
 
-bool ITypesUtil::Unmarshalling(DataShare::DataSharePredicates &predicates, MessageParcel &parcel)
-{
-    ZLOGD("Unmarshalling DataSharePredicates Start");
-    std::list<DataShare::OperationItem> operations{};
-    std::string whereClause = "";
-    std::vector<std::string> whereArgs;
-    std::string order = "";
-    int64_t mode = DataShare::INVALID_MODE;
-    size_t size = static_cast<size_t>(parcel.ReadInt32());
-    if (static_cast<int32_t>(size) < 0) {
-        ZLOGE("predicate read listSize failed");
-        return false;
-    }
-    if ((size > parcel.GetReadableBytes()) || (operations.max_size() < size)) {
-        ZLOGE("Read operations failed, size : %{public}zu", size);
-        return false;
-    }
-    operations.clear();
-    for (size_t i = 0; i < size; i++) {
-        DataShare::OperationItem listitem{};
-        if (!Unmarshalling(listitem, parcel)) {
-            ZLOGE("operations read OperationItem failed");
-            return false;
-        }
-        operations.push_back(listitem);
-    }
-    if (!parcel.ReadString(whereClause)) {
-        ZLOGE("predicate read whereClause failed");
-        return false;
-    }
-    if (!parcel.ReadStringVector(&whereArgs)) {
-        ZLOGE("predicate read whereArgs failed");
-        return false;
-    }
-    if (!parcel.ReadString(order)) {
-        ZLOGE("predicate read order failed");
-        return false;
-    }
-    if (!parcel.ReadInt64(mode)) {
-        ZLOGE("predicate read mode failed");
-        return false;
-    }
-    DataShare::DataSharePredicates tmpPredicates(operations);
-    tmpPredicates.SetWhereClause(whereClause);
-    tmpPredicates.SetWhereArgs(whereArgs);
-    tmpPredicates.SetOrder(order);
-    tmpPredicates.SetSettingMode(static_cast<DataShare::SettingMode>(mode));
-    predicates = tmpPredicates;
-    return true;
-}
-
-bool ITypesUtil::Unmarshalling(DataShare::DataShareValuesBucket &valuesBucket, MessageParcel &parcel)
-{
-    int len = parcel.ReadInt32();
-    if (len < 0) {
-        ZLOGE("valuesBucket read mapSize failed");
-        return false;
-    }
-    size_t size = static_cast<size_t>(len);
-    if ((size > parcel.GetReadableBytes()) || (valuesBucket.valuesMap.max_size() < size)) {
-        ZLOGE("Read valuesMap failed, size : %{public}zu", size);
-        return false;
-    }
-    valuesBucket.valuesMap.clear();
-    for (size_t i = 0; i < size; i++) {
-        std::string key = parcel.ReadString();
-        DataShare::DataShareValueObject value{};
-        if (!Unmarshalling(value, parcel)) {
-            ZLOGE("valuesBucket read value failed");
-            return false;
-        }
-        valuesBucket.valuesMap.insert(std::make_pair(key, value));
-    }
-    return true;
-}
-
-bool ITypesUtil::Unmarshalling(DataShare::OperationItem &operationItem, MessageParcel &parcel)
-{
-    operationItem.operation = static_cast<DataShare::OperationType>(parcel.ReadInt64());
-    if (operationItem.operation <DataShare::OperationType::INVALID_OPERATION) {
-        ZLOGE("operationItem read operation failed");
-        return false;
-    }
-    if (!Unmarshalling(operationItem.singleParams, parcel)) {
-        ZLOGE("Unmarshalling singleParams failed");
-        return false;
-    }
-    if (!Unmarshalling(operationItem.multiParams, parcel)) {
-        ZLOGE("Unmarshalling multiParams failed");
-        return false;
-    }
-    return true;
-}
-
-bool ITypesUtil::Unmarshalling(DataShare::DataSharePredicatesObject &predicatesObject, MessageParcel &parcel)
-{
-    int16_t type = parcel.ReadInt16();
-    if (type < (int16_t)DataShare::DataSharePredicatesObjectType::TYPE_NULL) {
-        ZLOGE("predicatesObject read type failed");
-        return false;
-    }
-    predicatesObject.type = static_cast<DataShare::DataSharePredicatesObjectType>(type);
-    switch (predicatesObject.type) {
-        case DataShare::DataSharePredicatesObjectType::TYPE_INT: {
-            predicatesObject.value = parcel.ReadInt32();
-            break;
-        }
-        case DataShare::DataSharePredicatesObjectType::TYPE_LONG: {
-            predicatesObject.value = parcel.ReadInt64();
-            break;
-        }
-        case DataShare::DataSharePredicatesObjectType::TYPE_DOUBLE: {
-            predicatesObject.value = parcel.ReadDouble();
-            break;
-        }
-        case DataShare::DataSharePredicatesObjectType::TYPE_STRING: {
-            predicatesObject.value = parcel.ReadString();
-            break;
-        }
-        case DataShare::DataSharePredicatesObjectType::TYPE_BOOL: {
-            predicatesObject.value = parcel.ReadBool();
-            break;
-        }
-        default:
-            break;
-    }
-    return true;
-}
-
-bool ITypesUtil::Unmarshalling(DataShare::DataSharePredicatesObjects &predicatesObject, MessageParcel &parcel)
-{
-    int16_t type = parcel.ReadInt16();
-    if (type < (int16_t)DataShare::DataSharePredicatesObjectsType::TYPE_NULL) {
-        ZLOGE("predicatesObject read type failed");
-        return false;
-    }
-    predicatesObject.type = static_cast<DataShare::DataSharePredicatesObjectsType>(type);
-    switch (predicatesObject.type) {
-        case DataShare::DataSharePredicatesObjectsType::TYPE_INT_VECTOR: {
-            std::vector<int> intval{};
-            if (!parcel.ReadInt32Vector(&intval)) {
-                ZLOGE("predicatesObject ReadInt32Vector value failed");
-                return false;
-            }
-            predicatesObject.value = intval;
-            break;
-        }
-        case DataShare::DataSharePredicatesObjectsType::TYPE_LONG_VECTOR: {
-            std::vector<int64_t> int64val{};
-            if (!parcel.ReadInt64Vector(&int64val)) {
-                ZLOGE("predicatesObject ReadInt64Vector value failed");
-                return false;
-            }
-            predicatesObject.value = int64val;
-            break;
-        }
-        case DataShare::DataSharePredicatesObjectsType::TYPE_DOUBLE_VECTOR: {
-            std::vector<double> doubleval{};
-            if (!parcel.ReadDoubleVector(&doubleval)) {
-                ZLOGE("predicatesObject ReadDoubleVector value failed");
-                return false;
-            }
-            predicatesObject.value = doubleval;
-            break;
-        }
-        case DataShare::DataSharePredicatesObjectsType::TYPE_STRING_VECTOR: {
-            std::vector<std::string> stringval{};
-            if (!parcel.ReadStringVector(&stringval)) {
-                ZLOGE("predicatesObject ReadDoubReadStringVectorleVector value failed");
-                return false;
-            }
-            predicatesObject.value = stringval;
-            break;
-        }
-        default:
-            break;
-    }
-    return true;
-}
-
-bool ITypesUtil::Unmarshalling(DataShare::DataShareValueObject &valueObject, MessageParcel &parcel)
-{
-    int16_t type = parcel.ReadInt16();
-    if (type < (int16_t)DataShare::DataShareValueObjectType::TYPE_NULL) {
-        ZLOGE("valueObject read type failed");
-        return false;
-    }
-    valueObject.type = static_cast<DataShare::DataShareValueObjectType>(type);
-    switch (valueObject.type) {
-        case DataShare::DataShareValueObjectType::TYPE_INT: {
-            valueObject.value = parcel.ReadInt64();
-            break;
-        }
-        case DataShare::DataShareValueObjectType::TYPE_DOUBLE: {
-            valueObject.value = parcel.ReadDouble();
-            break;
-        }
-        case DataShare::DataShareValueObjectType::TYPE_STRING: {
-            valueObject.value = parcel.ReadString();
-            break;
-        }
-        case DataShare::DataShareValueObjectType::TYPE_BLOB: {
-            std::vector<uint8_t> val;
-            if (!parcel.ReadUInt8Vector(&val)) {
-                ZLOGE("valueObject ReadUInt8Vector value failed");
-                return false;
-            }
-            valueObject.value = val;
-            break;
-        }
-        case DataShare::DataShareValueObjectType::TYPE_BOOL: {
-            valueObject.value = parcel.ReadBool();
-            break;
-        }
-        default:
-            break;
-    }
-    return true;
-}
+// bool ITypesUtil::Unmarshalling(DataShare::DataSharePredicates &predicates, MessageParcel &parcel)
+// {
+//     ZLOGD("Unmarshalling DataSharePredicates Start");
+//     std::list<DataShare::OperationItem> operations{};
+//     std::string whereClause = "";
+//     std::vector<std::string> whereArgs;
+//     std::string order = "";
+//     int64_t mode = DataShare::INVALID_MODE;
+//     size_t size = static_cast<size_t>(parcel.ReadInt32());
+//     if (static_cast<int32_t>(size) < 0) {
+//         ZLOGE("predicate read listSize failed");
+//         return false;
+//     }
+//     if ((size > parcel.GetReadableBytes()) || (operations.max_size() < size)) {
+//         ZLOGE("Read operations failed, size : %{public}zu", size);
+//         return false;
+//     }
+//     operations.clear();
+//     for (size_t i = 0; i < size; i++) {
+//         DataShare::OperationItem listitem{};
+//         if (!Unmarshalling(listitem, parcel)) {
+//             ZLOGE("operations read OperationItem failed");
+//             return false;
+//         }
+//         operations.push_back(listitem);
+//     }
+//     if (!parcel.ReadString(whereClause)) {
+//         ZLOGE("predicate read whereClause failed");
+//         return false;
+//     }
+//     if (!parcel.ReadStringVector(&whereArgs)) {
+//         ZLOGE("predicate read whereArgs failed");
+//         return false;
+//     }
+//     if (!parcel.ReadString(order)) {
+//         ZLOGE("predicate read order failed");
+//         return false;
+//     }
+//     if (!parcel.ReadInt64(mode)) {
+//         ZLOGE("predicate read mode failed");
+//         return false;
+//     }
+//     DataShare::DataSharePredicates tmpPredicates(operations);
+//     tmpPredicates.SetWhereClause(whereClause);
+//     tmpPredicates.SetWhereArgs(whereArgs);
+//     tmpPredicates.SetOrder(order);
+//     tmpPredicates.SetSettingMode(static_cast<DataShare::SettingMode>(mode));
+//     predicates = tmpPredicates;
+//     return true;
+// }
+
+// bool ITypesUtil::Unmarshalling(DataShare::DataShareValuesBucket &valuesBucket, MessageParcel &parcel)
+// {
+//     int len = parcel.ReadInt32();
+//     if (len < 0) {
+//         ZLOGE("valuesBucket read mapSize failed");
+//         return false;
+//     }
+//     size_t size = static_cast<size_t>(len);
+//     if ((size > parcel.GetReadableBytes()) || (valuesBucket.valuesMap.max_size() < size)) {
+//         ZLOGE("Read valuesMap failed, size : %{public}zu", size);
+//         return false;
+//     }
+//     valuesBucket.valuesMap.clear();
+//     for (size_t i = 0; i < size; i++) {
+//         std::string key = parcel.ReadString();
+//         DataShare::DataShareValueObject value{};
+//         if (!Unmarshalling(value, parcel)) {
+//             ZLOGE("valuesBucket read value failed");
+//             return false;
+//         }
+//         valuesBucket.valuesMap.insert(std::make_pair(key, value));
+//     }
+//     return true;
+// }
+
+// bool ITypesUtil::Unmarshalling(DataShare::OperationItem &operationItem, MessageParcel &parcel)
+// {
+//     operationItem.operation = static_cast<DataShare::OperationType>(parcel.ReadInt64());
+//     if (operationItem.operation <DataShare::OperationType::INVALID_OPERATION) {
+//         ZLOGE("operationItem read operation failed");
+//         return false;
+//     }
+//     if (!Unmarshalling(operationItem.singleParams, parcel)) {
+//         ZLOGE("Unmarshalling singleParams failed");
+//         return false;
+//     }
+//     if (!Unmarshalling(operationItem.multiParams, parcel)) {
+//         ZLOGE("Unmarshalling multiParams failed");
+//         return false;
+//     }
+//     return true;
+// }
+
+// bool ITypesUtil::Unmarshalling(DataShare::DataSharePredicatesObject &predicatesObject, MessageParcel &parcel)
+// {
+//     int16_t type = parcel.ReadInt16();
+//     if (type < (int16_t)DataShare::DataSharePredicatesObjectType::TYPE_NULL) {
+//         ZLOGE("predicatesObject read type failed");
+//         return false;
+//     }
+//     predicatesObject.type = static_cast<DataShare::DataSharePredicatesObjectType>(type);
+//     switch (predicatesObject.type) {
+//         case DataShare::DataSharePredicatesObjectType::TYPE_INT: {
+//             predicatesObject.value = parcel.ReadInt32();
+//             break;
+//         }
+//         case DataShare::DataSharePredicatesObjectType::TYPE_LONG: {
+//             predicatesObject.value = parcel.ReadInt64();
+//             break;
+//         }
+//         case DataShare::DataSharePredicatesObjectType::TYPE_DOUBLE: {
+//             predicatesObject.value = parcel.ReadDouble();
+//             break;
+//         }
+//         case DataShare::DataSharePredicatesObjectType::TYPE_STRING: {
+//             predicatesObject.value = parcel.ReadString();
+//             break;
+//         }
+//         case DataShare::DataSharePredicatesObjectType::TYPE_BOOL: {
+//             predicatesObject.value = parcel.ReadBool();
+//             break;
+//         }
+//         default:
+//             break;
+//     }
+//     return true;
+// }
+
+// bool ITypesUtil::Unmarshalling(DataShare::DataSharePredicatesObjects &predicatesObject, MessageParcel &parcel)
+// {
+//     int16_t type = parcel.ReadInt16();
+//     if (type < (int16_t)DataShare::DataSharePredicatesObjectsType::TYPE_NULL) {
+//         ZLOGE("predicatesObject read type failed");
+//         return false;
+//     }
+//     predicatesObject.type = static_cast<DataShare::DataSharePredicatesObjectsType>(type);
+//     switch (predicatesObject.type) {
+//         case DataShare::DataSharePredicatesObjectsType::TYPE_INT_VECTOR: {
+//             std::vector<int> intval{};
+//             if (!parcel.ReadInt32Vector(&intval)) {
+//                 ZLOGE("predicatesObject ReadInt32Vector value failed");
+//                 return false;
+//             }
+//             predicatesObject.value = intval;
+//             break;
+//         }
+//         case DataShare::DataSharePredicatesObjectsType::TYPE_LONG_VECTOR: {
+//             std::vector<int64_t> int64val{};
+//             if (!parcel.ReadInt64Vector(&int64val)) {
+//                 ZLOGE("predicatesObject ReadInt64Vector value failed");
+//                 return false;
+//             }
+//             predicatesObject.value = int64val;
+//             break;
+//         }
+//         case DataShare::DataSharePredicatesObjectsType::TYPE_DOUBLE_VECTOR: {
+//             std::vector<double> doubleval{};
+//             if (!parcel.ReadDoubleVector(&doubleval)) {
+//                 ZLOGE("predicatesObject ReadDoubleVector value failed");
+//                 return false;
+//             }
+//             predicatesObject.value = doubleval;
+//             break;
+//         }
+//         case DataShare::DataSharePredicatesObjectsType::TYPE_STRING_VECTOR: {
+//             std::vector<std::string> stringval{};
+//             if (!parcel.ReadStringVector(&stringval)) {
+//                 ZLOGE("predicatesObject ReadDoubReadStringVectorleVector value failed");
+//                 return false;
+//             }
+//             predicatesObject.value = stringval;
+//             break;
+//         }
+//         default:
+//             break;
+//     }
+//     return true;
+// }
+
+// bool ITypesUtil::Unmarshalling(DataShare::DataShareValueObject &valueObject, MessageParcel &parcel)
+// {
+//     int16_t type = parcel.ReadInt16();
+//     if (type < (int16_t)DataShare::DataShareValueObjectType::TYPE_NULL) {
+//         ZLOGE("valueObject read type failed");
+//         return false;
+//     }
+//     valueObject.type = static_cast<DataShare::DataShareValueObjectType>(type);
+//     switch (valueObject.type) {
+//         case DataShare::DataShareValueObjectType::TYPE_INT: {
+//             valueObject.value = parcel.ReadInt64();
+//             break;
+//         }
+//         case DataShare::DataShareValueObjectType::TYPE_DOUBLE: {
+//             valueObject.value = parcel.ReadDouble();
+//             break;
+//         }
+//         case DataShare::DataShareValueObjectType::TYPE_STRING: {
+//             valueObject.value = parcel.ReadString();
+//             break;
+//         }
+//         case DataShare::DataShareValueObjectType::TYPE_BLOB: {
+//             std::vector<uint8_t> val;
+//             if (!parcel.ReadUInt8Vector(&val)) {
+//                 ZLOGE("valueObject ReadUInt8Vector value failed");
+//                 return false;
+//             }
+//             valueObject.value = val;
+//             break;
+//         }
+//         case DataShare::DataShareValueObjectType::TYPE_BOOL: {
+//             valueObject.value = parcel.ReadBool();
+//             break;
+//         }
+//         default:
+//             break;
+//     }
+//     return true;
+// }
 
 int64_t ITypesUtil::GetTotalSize(const std::vector<Entry> &entries)
 {
diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp
index bb251c6..1ec901d 100644
--- a/frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp
+++ b/frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp
@@ -20,11 +20,11 @@
 #include "cov_util.h"
 #include "log_print.h"
 #include "data_query.h"
-#include "kvstore_datashare_bridge.h"
+// #include "kvstore_datashare_bridge.h"
 
 namespace OHOS {
 namespace DistributedKv {
-using namespace DataShare;
+// using namespace DataShare;
 using namespace DistributedData;
 const std::string KvUtils::KEY = "key";
 const std::string KvUtils::VALUE = "value";
diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp
index a1e1e4e..61b6afd 100644
--- a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp
+++ b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp
@@ -20,7 +20,7 @@
 
 namespace OHOS {
 namespace DistributedKv {
-using namespace DataShare;
+// using namespace DataShare;
 KvStoreDataShareBridge::KvStoreDataShareBridge(std::shared_ptr<KvStoreResultSet> kvResultSet)
     :kvResultSet_(kvResultSet) {};
 
diff --git a/frameworks/innerkitsimpl/distributeddatafwk/test/BUILD.gn b/frameworks/innerkitsimpl/distributeddatafwk/test/BUILD.gn
index 8801db3..2ac4f58 100644
--- a/frameworks/innerkitsimpl/distributeddatafwk/test/BUILD.gn
+++ b/frameworks/innerkitsimpl/distributeddatafwk/test/BUILD.gn
@@ -11,7 +11,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import("//build/test.gni")
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
 
 module_output_path = "kv_store/distributeddatafwk"
 
@@ -29,8 +29,8 @@ config("module_private_config") {
     "../../rdb/src",
     "../../../common/",
     "../../../../interfaces/innerkits/distributeddata/include/",
-    "${datashare_innerapi_path}/common/include",
-    "${datashare_innerapi_path}/provider/include",
+    # "${datashare_innerapi_path}/common/include",
+    # "${datashare_innerapi_path}/provider/include",
 
     # TEMP MODIFICATION FOR PMS
     "../../../../services/distributeddataservice/app/include",
@@ -60,9 +60,9 @@ ohos_source_set("distributeddatafwk_src_file") {
     "../src/ikvstore_observer.cpp",
     "../src/ikvstore_sync_callback.cpp",
     "../src/itypes_util.cpp",
-    "../src/kv_utils.cpp",
+    # "../src/kv_utils.cpp",
     "../src/kvstore_client_death_observer.cpp",
-    "../src/kvstore_datashare_bridge.cpp",
+    # "../src/kvstore_datashare_bridge.cpp",
     "../src/kvstore_observer_client.cpp",
     "../src/kvstore_service_death_notifier.cpp",
     "../src/kvstore_sync_callback_client.cpp",
@@ -96,6 +96,7 @@ ohos_source_set("distributeddatafwk_src_file") {
 
   sources = old_sources + rdb_sources + kvdb_sources
   configs = [ ":module_private_config" ]
+  cflags_cc = [ "-Wno-c99-designator" ]
 
   deps = [
     "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
diff --git a/frameworks/innerkitsimpl/kvdb/src/store_util.cpp b/frameworks/innerkitsimpl/kvdb/src/store_util.cpp
index 77b0d60..5f4646a 100644
--- a/frameworks/innerkitsimpl/kvdb/src/store_util.cpp
+++ b/frameworks/innerkitsimpl/kvdb/src/store_util.cpp
@@ -18,6 +18,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include <atomic>
 #include "log_print.h"
 #include "types.h"
 #include "unistd.h"
diff --git a/frameworks/innerkitsimpl/kvdb/test/BUILD.gn b/frameworks/innerkitsimpl/kvdb/test/BUILD.gn
index e19521c..bc262f7 100644
--- a/frameworks/innerkitsimpl/kvdb/test/BUILD.gn
+++ b/frameworks/innerkitsimpl/kvdb/test/BUILD.gn
@@ -11,7 +11,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import("//build/test.gni")
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
 
 module_output_path = "kv_store/distributeddatafwk"
 
@@ -29,8 +29,8 @@ config("module_private_config") {
     "../../rdb/src",
     "../../../common/",
     "../../../../interfaces/innerkits/distributeddata/include/",
-    "${datashare_innerapi_path}/common/include",
-    "${datashare_innerapi_path}/provider/include",
+    # "${datashare_innerapi_path}/common/include",
+    # "${datashare_innerapi_path}/provider/include",
 
     # TEMP MODIFICATION FOR PMS
     "../../../../services/distributeddataservice/app/include",
@@ -99,7 +99,8 @@ ohos_source_set("kvdb_src_file") {
   ]
 
   sources = old_sources + rdb_sources + kvdb_sources
-  configs = [ ":module_private_config" ]
+  configs = [ ":module_private_config",
+  "-Wno-c99-designator",]
 
   deps = [
     "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
diff --git a/frameworks/libs/distributeddb/common/src/db_common.cpp b/frameworks/libs/distributeddb/common/src/db_common.cpp
index 9b51158..3963fc5 100644
--- a/frameworks/libs/distributeddb/common/src/db_common.cpp
+++ b/frameworks/libs/distributeddb/common/src/db_common.cpp
@@ -181,6 +181,9 @@ int DBCommon::CreateStoreDirectory(const std::string &directory, const std::stri
     }
 
     newDir += identifierName;
+    LOGI("[HP_DEBUG] new path is %s", newDir.c_str());
+    // if (!isCreate) {
+    isCreate = true; // HP_DEBUG debug 修改
     if (!isCreate) {
         if (!OS::CheckPathExistence(newDir)) {
             LOGE("Required path does not exist and won't create.");
diff --git a/frameworks/libs/distributeddb/common/src/platform_specific.cpp b/frameworks/libs/distributeddb/common/src/platform_specific.cpp
index 0b723ec..e22b0fd 100644
--- a/frameworks/libs/distributeddb/common/src/platform_specific.cpp
+++ b/frameworks/libs/distributeddb/common/src/platform_specific.cpp
@@ -152,6 +152,7 @@ int GetRealPath(const std::string &inOriPath, std::string &outRealPath)
 
     if (_fullpath(realPath, inOriPath.c_str(), MAX_PATH_LENGTH) == nullptr) {
         LOGE("[OS] Realpath error:%d.", errno);
+        LOGE("[HP_DEBUG]GetRealPath path is %s", inOriPath.c_str());
         delete [] realPath;
         return -E_SYSTEM_API_FAIL;
     }
@@ -448,6 +449,7 @@ int GetRealPath(const std::string &inOriPath, std::string &outRealPath)
 
     if (realpath(inOriPath.c_str(), realPath) == nullptr) {
         LOGE("[OS] Realpath error:%d.", errno);
+        LOGE("[HP_DEBUG] path is %s", inOriPath.c_str());
         delete []realPath;
         return -E_SYSTEM_API_FAIL;
     }
diff --git a/frameworks/libs/distributeddb/common/src/runtime_context_impl.cpp b/frameworks/libs/distributeddb/common/src/runtime_context_impl.cpp
index 4bfcf14..a428397 100644
--- a/frameworks/libs/distributeddb/common/src/runtime_context_impl.cpp
+++ b/frameworks/libs/distributeddb/common/src/runtime_context_impl.cpp
@@ -515,6 +515,7 @@ int RuntimeContextImpl::GetSecurityOption(const std::string &filePath, SecurityO
         LOGI("Get Security option, but not set system api adapter!");
         return -E_NOT_SUPPORT;
     }
+    LOGI("[HP_DEBUG] GetSecurityOption filePath = %s", filePath.c_str());
     int errCode = systemApiAdapter_->GetSecurityOption(filePath, option);
     if (errCode != OK) {
         if (errCode == NOT_SUPPORT) {
diff --git a/interfaces/innerkits/distributeddata/BUILD.gn b/interfaces/innerkits/distributeddata/BUILD.gn
index 1b61095..b7fde21 100644
--- a/interfaces/innerkits/distributeddata/BUILD.gn
+++ b/interfaces/innerkits/distributeddata/BUILD.gn
@@ -11,7 +11,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import("//build/ohos.gni")
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
 
 group("build_module") {
   deps = [ ":distributeddata_inner" ]
@@ -22,8 +22,6 @@ config("distributeddatafwk_config") {
 
   cflags = [ "-Wno-multichar" ]
 
-  cflags_cc = [ "-fvisibility=hidden" ]
-
   include_dirs = [
     "include",
     "../../../frameworks/innerkitsimpl/distributeddatafwk/include",
@@ -36,8 +34,8 @@ config("distributeddatafwk_config") {
     "../../../frameworks/innerkitsimpl/kvdb/src",
     "//utils/system/safwk/native/include",
     "//commonlibrary/c_utils/base/include",
-    "${datashare_innerapi_path}/common/include",
-    "${datashare_innerapi_path}/provider/include",
+    # "${datashare_innerapi_path}/common/include",
+    # "${datashare_innerapi_path}/provider/include",
     "//foundation/distributeddatamgr/distributedfile/interfaces/kits/js/src/mod_securitylabel",
     "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/dfx",
     "//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/include",
@@ -69,9 +67,9 @@ ohos_shared_library("distributeddata_inner") {
     "../../../frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_observer.cpp",
     "../../../frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_sync_callback.cpp",
     "../../../frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp",
-    "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp",
+    # "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp",
     "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_client_death_observer.cpp",
-    "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp",
+    # "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp",
     "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_observer_client.cpp",
     "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_service_death_notifier.cpp",
     "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_sync_callback_client.cpp",
@@ -118,9 +116,9 @@ ohos_shared_library("distributeddata_inner") {
   ]
   external_deps = [
     "c_utils:utils",
-    "hisysevent_native:libhisysevent",
-    "hitrace_native:hitrace_meter",
-    "hitrace_native:libhitracechain",
+    # "hisysevent_native:libhisysevent",
+    # "hitrace_native:hitrace_meter",
+    # "hitrace_native:libhitracechain",
     "hiviewdfx_hilog_native:libhilog",
     "huks:libhukssdk",
     "ipc:ipc_core",
diff --git a/interfaces/innerkits/distributeddata/include/kv_utils.h b/interfaces/innerkits/distributeddata/include/kv_utils.h
index 6034053..4f00921 100644
--- a/interfaces/innerkits/distributeddata/include/kv_utils.h
+++ b/interfaces/innerkits/distributeddata/include/kv_utils.h
@@ -17,97 +17,97 @@
 #define KV_UTILS_H
 
 #include "types.h"
-#include "datashare_abs_predicates.h"
+// #include "datashare_abs_predicates.h"
 #include "data_query.h"
-#include "datashare_values_bucket.h"
+// #include "datashare_values_bucket.h"
 #include "kvstore_result_set.h"
-#include "result_set_bridge.h"
+// #include "result_set_bridge.h"
 
 namespace OHOS {
 namespace DistributedKv {
-class KvUtils {
-public:
-    enum {
-        STRING = 0,
-        INTEGER = 1,
-        FLOAT = 2,
-        BYTE_ARRAY = 3,
-        BOOLEAN = 4,
-        DOUBLE = 5,
-        INVALID = 255
-    };
-    static std::shared_ptr<DataShare::ResultSetBridge> ToResultSetBridge(std::shared_ptr<KvStoreResultSet> resultSet);
-    static Status ToQuery(const DataShare::DataShareAbsPredicates &predicates, DataQuery &query);
-    static Entry ToEntry(const DataShare::DataShareValuesBucket &valueBucket);
-    static std::vector<Entry> ToEntries(const std::vector<DataShare::DataShareValuesBucket> &valueBuckets);
-    static Status GetKeys(const DataShare::DataShareAbsPredicates &predicates, std::vector<Key> &keys);
-private:
-    static void NoSupport(const DataShare::OperationItem &oper, DataQuery &query);
-    static void EqualTo(const DataShare::OperationItem &oper, DataQuery &query);
-    static void NotEqualTo(const DataShare::OperationItem &oper, DataQuery &query);
-    static void GreaterThan(const DataShare::OperationItem &oper, DataQuery &query);
-    static void LessThan(const DataShare::OperationItem &oper, DataQuery &query);
-    static void GreaterThanOrEqualTo(const DataShare::OperationItem &oper, DataQuery &query);
-    static void LessThanOrEqualTo(const DataShare::OperationItem &oper, DataQuery &query);
-    static void And(const DataShare::OperationItem &oper, DataQuery &query);
-    static void Or(const DataShare::OperationItem &oper, DataQuery &query);
-    static void IsNull(const DataShare::OperationItem &oper, DataQuery &query);
-    static void IsNotNull(const DataShare::OperationItem &oper, DataQuery &query);
-    static void In(const DataShare::OperationItem &oper, DataQuery &query);
-    static void NotIn(const DataShare::OperationItem &oper, DataQuery &query);
-    static void Like(const DataShare::OperationItem &oper, DataQuery &query);
-    static void Unlike(const DataShare::OperationItem &oper, DataQuery &query);
-    static void OrderByAsc(const DataShare::OperationItem &oper, DataQuery &query);
-    static void OrderByDesc(const DataShare::OperationItem &oper, DataQuery &query);
-    static void Limit(const DataShare::OperationItem &oper, DataQuery &query);
-    static void InKeys(const DataShare::OperationItem &oper, DataQuery &query);
-    static void KeyPrefix(const DataShare::OperationItem &oper, DataQuery &query);
+// class KvUtils {
+// public:
+//     enum {
+//         STRING = 0,
+//         INTEGER = 1,
+//         FLOAT = 2,
+//         BYTE_ARRAY = 3,
+//         BOOLEAN = 4,
+//         DOUBLE = 5,
+//         INVALID = 255
+//     };
+//     static std::shared_ptr<DataShare::ResultSetBridge> ToResultSetBridge(std::shared_ptr<KvStoreResultSet> resultSet);
+//     static Status ToQuery(const DataShare::DataShareAbsPredicates &predicates, DataQuery &query);
+//     static Entry ToEntry(const DataShare::DataShareValuesBucket &valueBucket);
+//     static std::vector<Entry> ToEntries(const std::vector<DataShare::DataShareValuesBucket> &valueBuckets);
+//     static Status GetKeys(const DataShare::DataShareAbsPredicates &predicates, std::vector<Key> &keys);
+// private:
+//     static void NoSupport(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void EqualTo(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void NotEqualTo(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void GreaterThan(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void LessThan(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void GreaterThanOrEqualTo(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void LessThanOrEqualTo(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void And(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void Or(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void IsNull(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void IsNotNull(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void In(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void NotIn(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void Like(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void Unlike(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void OrderByAsc(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void OrderByDesc(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void Limit(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void InKeys(const DataShare::OperationItem &oper, DataQuery &query);
+//     static void KeyPrefix(const DataShare::OperationItem &oper, DataQuery &query);
 
-    KvUtils(KvUtils &&) = delete;
-    KvUtils(const KvUtils &) = delete;
-    KvUtils &operator=(KvUtils &&) = delete;
-    KvUtils &operator=(const KvUtils &) = delete;
-    ~KvUtils() = delete;
-    static Status ToEntryKey(const std::map<std::string, DataShare::DataShareValueObject> &values, Blob &blob);
-    static Status ToEntryValue(const std::map<std::string, DataShare::DataShareValueObject> &values, Blob &blob);
-    static const std::string KEY;
-    static const std::string VALUE;
-    using QueryHandler = void (*)(const DataShare::OperationItem &, DataQuery &);
-    static constexpr QueryHandler HANDLERS[DataShare::LAST_TYPE] = {
-        [DataShare::INVALID_OPERATION] = &KvUtils::NoSupport,
-        [DataShare::EQUAL_TO] = &KvUtils::EqualTo,
-        [DataShare::NOT_EQUAL_TO] = &KvUtils::NotEqualTo,
-        [DataShare::GREATER_THAN] = &KvUtils::GreaterThan,
-        [DataShare::LESS_THAN] = &KvUtils::LessThan,
-        [DataShare::GREATER_THAN_OR_EQUAL_TO] = &KvUtils::GreaterThanOrEqualTo,
-        [DataShare::LESS_THAN_OR_EQUAL_TO] = &KvUtils::LessThanOrEqualTo,
-        [DataShare::AND] = &KvUtils::And,
-        [DataShare::OR] = &KvUtils::Or,
-        [DataShare::IS_NULL] = &KvUtils::IsNull,
-        [DataShare::IS_NOT_NULL] = &KvUtils::IsNotNull,
-        [DataShare::SQL_IN] = &KvUtils::In,
-        [DataShare::NOT_IN] = &KvUtils::NotIn,
-        [DataShare::LIKE] = &KvUtils::Like,
-        [DataShare::UNLIKE] = &KvUtils::Unlike,
-        [DataShare::ORDER_BY_ASC] = &KvUtils::OrderByAsc,
-        [DataShare::ORDER_BY_DESC] = &KvUtils::OrderByDesc,
-        [DataShare::LIMIT] = &KvUtils::Limit,
-        [DataShare::OFFSET] = &KvUtils::NoSupport,
-        [DataShare::BEGIN_WARP] = &KvUtils::NoSupport,
-        [DataShare::END_WARP] = &KvUtils::NoSupport,
-        [DataShare::BEGIN_WITH] = &KvUtils::NoSupport,
-        [DataShare::END_WITH] = &KvUtils::NoSupport,
-        [DataShare::IN_KEY] = &KvUtils::InKeys,
-        [DataShare::DISTINCT] = &KvUtils::NoSupport,
-        [DataShare::GROUP_BY] = &KvUtils::NoSupport,
-        [DataShare::INDEXED_BY] = &KvUtils::NoSupport,
-        [DataShare::CONTAINS] = &KvUtils::NoSupport,
-        [DataShare::GLOB] = &KvUtils::NoSupport,
-        [DataShare::BETWEEN] = &KvUtils::NoSupport,
-        [DataShare::NOTBETWEEN] = &KvUtils::NoSupport,
-        [DataShare::KEY_PREFIX] = &KvUtils::KeyPrefix,
-        };
-};
+//     KvUtils(KvUtils &&) = delete;
+//     KvUtils(const KvUtils &) = delete;
+//     KvUtils &operator=(KvUtils &&) = delete;
+//     KvUtils &operator=(const KvUtils &) = delete;
+//     ~KvUtils() = delete;
+//     static Status ToEntryKey(const std::map<std::string, DataShare::DataShareValueObject> &values, Blob &blob);
+//     static Status ToEntryValue(const std::map<std::string, DataShare::DataShareValueObject> &values, Blob &blob);
+//     static const std::string KEY;
+//     static const std::string VALUE;
+//     using QueryHandler = void (*)(const DataShare::OperationItem &, DataQuery &);
+//     static constexpr QueryHandler HANDLERS[DataShare::LAST_TYPE] = {
+//         [DataShare::INVALID_OPERATION] = &KvUtils::NoSupport,
+//         [DataShare::EQUAL_TO] = &KvUtils::EqualTo,
+//         [DataShare::NOT_EQUAL_TO] = &KvUtils::NotEqualTo,
+//         [DataShare::GREATER_THAN] = &KvUtils::GreaterThan,
+//         [DataShare::LESS_THAN] = &KvUtils::LessThan,
+//         [DataShare::GREATER_THAN_OR_EQUAL_TO] = &KvUtils::GreaterThanOrEqualTo,
+//         [DataShare::LESS_THAN_OR_EQUAL_TO] = &KvUtils::LessThanOrEqualTo,
+//         [DataShare::AND] = &KvUtils::And,
+//         [DataShare::OR] = &KvUtils::Or,
+//         [DataShare::IS_NULL] = &KvUtils::IsNull,
+//         [DataShare::IS_NOT_NULL] = &KvUtils::IsNotNull,
+//         [DataShare::SQL_IN] = &KvUtils::In,
+//         [DataShare::NOT_IN] = &KvUtils::NotIn,
+//         [DataShare::LIKE] = &KvUtils::Like,
+//         [DataShare::UNLIKE] = &KvUtils::Unlike,
+//         [DataShare::ORDER_BY_ASC] = &KvUtils::OrderByAsc,
+//         [DataShare::ORDER_BY_DESC] = &KvUtils::OrderByDesc,
+//         [DataShare::LIMIT] = &KvUtils::Limit,
+//         [DataShare::OFFSET] = &KvUtils::NoSupport,
+//         [DataShare::BEGIN_WARP] = &KvUtils::NoSupport,
+//         [DataShare::END_WARP] = &KvUtils::NoSupport,
+//         [DataShare::BEGIN_WITH] = &KvUtils::NoSupport,
+//         [DataShare::END_WITH] = &KvUtils::NoSupport,
+//         [DataShare::IN_KEY] = &KvUtils::InKeys,
+//         [DataShare::DISTINCT] = &KvUtils::NoSupport,
+//         [DataShare::GROUP_BY] = &KvUtils::NoSupport,
+//         [DataShare::INDEXED_BY] = &KvUtils::NoSupport,
+//         [DataShare::CONTAINS] = &KvUtils::NoSupport,
+//         [DataShare::GLOB] = &KvUtils::NoSupport,
+//         [DataShare::BETWEEN] = &KvUtils::NoSupport,
+//         [DataShare::NOTBETWEEN] = &KvUtils::NoSupport,
+//         [DataShare::KEY_PREFIX] = &KvUtils::KeyPrefix,
+//         };
+// };
 } // namespace DistributedKv
 } // namespace OHOS
 #endif // KV_UTILS_H
\ No newline at end of file
diff --git a/interfaces/jskits/distributeddata/BUILD.gn b/interfaces/jskits/distributeddata/BUILD.gn
index 5f5fb5b..bb40f71 100644
--- a/interfaces/jskits/distributeddata/BUILD.gn
+++ b/interfaces/jskits/distributeddata/BUILD.gn
@@ -13,7 +13,7 @@
 
 import("//build/ohos.gni")
 import("//build/ohos/ace/ace.gni")
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
 
 base_output_path = get_label_info(":distributed_data_js", "target_out_dir")
 distributed_data_js_obj_path = base_output_path + "/distributed_data.o"
@@ -43,13 +43,13 @@ ohos_shared_library("distributeddata") {
     "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/include",
     "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include",
     "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/include",
-    "${datashare_innerapi_path}/common/include",
-    "${datashare_innerapi_path}/provider/include",
+    # "${datashare_innerapi_path}/common/include",
+    # "${datashare_innerapi_path}/provider/include",
   ]
 
   sources = [
-    "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp",
-    "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp",
+    # "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp",
+    # "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp",
     "../../../frameworks/jskitsimpl/distributeddata/src/entry_point.cpp",
     "../../../frameworks/jskitsimpl/distributeddata/src/js_const_properties.cpp",
     "../../../frameworks/jskitsimpl/distributeddata/src/js_device_kv_store.cpp",
@@ -69,10 +69,6 @@ ohos_shared_library("distributeddata") {
   deps = []
 
   external_deps = [
-    "ability_base:want",
-    "ability_runtime:ability_manager",
-    "ability_runtime:abilitykit_native",
-    "ability_runtime:napi_base_context",
     "c_utils:utils",
     "hiviewdfx_hilog_native:libhilog",
     "ipc:ipc_core",
diff --git a/interfaces/jskits/distributedkvstore/BUILD.gn b/interfaces/jskits/distributedkvstore/BUILD.gn
index e9ce9b4..06d9da4 100644
--- a/interfaces/jskits/distributedkvstore/BUILD.gn
+++ b/interfaces/jskits/distributedkvstore/BUILD.gn
@@ -13,7 +13,7 @@
 
 import("//build/ohos.gni")
 import("//build/ohos/ace/ace.gni")
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
 
 base_output_path = get_label_info(":distributed_kvstore_js", "target_out_dir")
 distributed_data_js_obj_path = base_output_path + "/distributed_kvstore.o"
@@ -43,13 +43,13 @@ ohos_shared_library("distributedkvstore") {
     "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/include",
     "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributedkvstore/include",
     "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/include",
-    "${datashare_innerapi_path}/common/include",
-    "${datashare_innerapi_path}/provider/include",
+    # "${datashare_innerapi_path}/common/include",
+    # "${datashare_innerapi_path}/provider/include",
   ]
 
   sources = [
-    "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp",
-    "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp",
+    # "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp",
+    # "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_datashare_bridge.cpp",
     "../../../frameworks/jskitsimpl/distributedkvstore/src/entry_point.cpp",
     "../../../frameworks/jskitsimpl/distributedkvstore/src/js_const_properties.cpp",
     "../../../frameworks/jskitsimpl/distributedkvstore/src/js_device_kv_store.cpp",
@@ -69,10 +69,10 @@ ohos_shared_library("distributedkvstore") {
   deps = []
 
   external_deps = [
-    "ability_base:want",
-    "ability_runtime:ability_manager",
-    "ability_runtime:abilitykit_native",
-    "ability_runtime:napi_base_context",
+    # "ability_base:want",
+    # "ability_runtime:ability_manager",
+    # "ability_runtime:abilitykit_native",
+    # "ability_runtime:napi_base_context",
     "c_utils:utils",
     "hiviewdfx_hilog_native:libhilog",
     "ipc:ipc_core",
diff --git a/kvstoremock/interfaces/innerkits/distributeddata/BUILD.gn b/kvstoremock/interfaces/innerkits/distributeddata/BUILD.gn
index 03f6d33..84eb46c 100644
--- a/kvstoremock/interfaces/innerkits/distributeddata/BUILD.gn
+++ b/kvstoremock/interfaces/innerkits/distributeddata/BUILD.gn
@@ -12,7 +12,7 @@
 # limitations under the License.
 import("//build/ohos.gni")
 import("//build/ohos/ace/ace.gni")
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
 import("//foundation/distributeddatamgr/kv_store/kv_store.gni")
 
 group("build_module") {
@@ -75,8 +75,8 @@ ohos_shared_library("distributeddata_inner_mock") {
     "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/include",
     "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/src",
     "//utils/system/safwk/native/include",
-    "${datashare_innerapi_path}/common/include",
-    "${datashare_innerapi_path}/provider/include",
+    # "${datashare_innerapi_path}/common/include",
+    # "${datashare_innerapi_path}/provider/include",
     "//foundation/distributeddatamgr/distributedfile/interfaces/kits/js/src/mod_securitylabel",
     "//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/include",
     "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/rdb/include",
diff --git a/kvstoremock/interfaces/jskits/distributeddata/BUILD.gn b/kvstoremock/interfaces/jskits/distributeddata/BUILD.gn
index e40610e..9b70889 100644
--- a/kvstoremock/interfaces/jskits/distributeddata/BUILD.gn
+++ b/kvstoremock/interfaces/jskits/distributeddata/BUILD.gn
@@ -13,7 +13,7 @@
 
 import("//build/ohos.gni")
 import("//build/ohos/ace/ace.gni")
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
 import("//foundation/distributeddatamgr/kv_store/kv_store.gni")
 
 base_output_path = get_label_info(":distributed_data_js", "target_out_dir")
@@ -48,7 +48,7 @@ if (use_platform_win || use_platforn_mac) {
     ]
     cflags_cc = [ "-std=c++17" ]
     sources = [
-      "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp",
+      # "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp",
       "../../../frameworks/jskitsimpl/distributeddata/src/js_util.cpp",
       "../../../interfaces/mock/log_print.cpp",
       "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributeddata/src/entry_point.cpp",
diff --git a/test/fuzztest/typesutil_fuzzer/BUILD.gn b/test/fuzztest/typesutil_fuzzer/BUILD.gn
index 5957200..f23ab67 100644
--- a/test/fuzztest/typesutil_fuzzer/BUILD.gn
+++ b/test/fuzztest/typesutil_fuzzer/BUILD.gn
@@ -14,7 +14,7 @@
 #####################hydra-fuzz###################
 import("//build/config/features.gni")
 import("//build/test.gni")
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
 
 ##############################fuzztest##########################################
 ohos_fuzztest("TypesUtilFuzzTest") {
@@ -28,8 +28,8 @@ ohos_fuzztest("TypesUtilFuzzTest") {
     "../../../frameworks/innerkitsimpl/kvdb/include",
     "../../../frameworks/innerkitsimpl/rdb/include",
     "../../../interfaces/innerkits/distributeddata/include",
-    "${datashare_innerapi_path}/common/include",
-    "${datashare_innerapi_path}/provider/include",
+    # "${datashare_innerapi_path}/common/include",
+    # "${datashare_innerapi_path}/provider/include",
   ]
 
   fuzz_config_file = "../../../test/fuzztest/typesutil_fuzzer"
-- 
2.24.3 (Apple Git-128)

