From 68b55dfcb41abd32df6fb55a08a936f28048af89 Mon Sep 17 00:00:00 2001 From: Caisking Date: Thu, 22 May 2025 09:54:47 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9kv=E7=9A=84=E6=8B=BC=E6=8E=A5?= =?utf8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeapp/nativeui/screensetting/src/ScreenModels.cpp | 2 +- .../fd230/nativeapp/nativeui/system/include/Systemupgrade.h | 4 +++- .../fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp | 6 ++++-- .../nativeapp/nativeui/screensetting/src/ScreenModels.cpp | 2 +- .../native/lite/kv_store/src/kvstore_impl_posix/kv_store.c | 4 ---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/screensetting/src/ScreenModels.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/screensetting/src/ScreenModels.cpp index e93dc6a7c..82d584980 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/screensetting/src/ScreenModels.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/screensetting/src/ScreenModels.cpp @@ -38,7 +38,7 @@ void ScreenModels::InitKvStorage(void) { #if !defined(_WIN32) #ifndef XTS_SUPPORT - int ret = UtilsSetEnv("/user"); + int ret = UtilsSetEnv("/user/system"); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "UtilsSetEnv /user ret = %d", ret); #endif #else diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/Systemupgrade.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/Systemupgrade.h index 634c7a4ee..5ad83461f 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/Systemupgrade.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/Systemupgrade.h @@ -1,7 +1,7 @@ #ifndef SYSTEM_UPGRADE_VIEW_H #define SYSTEM_UPGRADE_VIEW_H -#ifndef XTS_SUPPORT +#if !defined(XTS_SUPPORT) && !defined(SUPPORT_CAT1_SERVICE) #include "View.h" #include "components/ui_image_view.h" @@ -10,7 +10,9 @@ #include "components/ui_label.h" #include "components/ui_label_ext.h" #include "components/ui_label_button_ext.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" +#endif #include "upg_common_porting.h" #if USE_THISIOT diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp index bc5531e7d..4cde9a5d3 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp @@ -1,4 +1,4 @@ -#ifndef XTS_SUPPORT +#if defined(XTS_SUPPORT) && defined(SUPPORT_CAT1_SERVICE) #include "system/include/Systemupgrade.h" #include "system/include/SystemPresenter.h" @@ -10,12 +10,14 @@ #include #include "cJSON.h" #include "ConfigModel.h" +#ifdef SUPPORT_CAT1_SERVICE #include "lwip/err.h" +#include "lwip/apps/http_client.h" +#endif #include "power_display_service.h" #include "cmsis_os2.h" #include "los_memory.h" #include "thread_init.h" - #include "lwip/apps/http_client.h" #include "tcxo.h" #include "cat1_server.h" #include "linux/delay.h" diff --git a/code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp b/code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp index 3a76e1460..5720b8336 100644 --- a/code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp @@ -38,7 +38,7 @@ void ScreenModels::InitKvStorage(void) { #if !defined(_WIN32) #ifndef XTS_SUPPORT - int ret = UtilsSetEnv("/user"); + int ret = UtilsSetEnv("/user/system"); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "UtilsSetEnv /user ret = %d", ret); #endif #else diff --git a/code/sdk/open_source/openharmony/utils/native/lite/kv_store/src/kvstore_impl_posix/kv_store.c b/code/sdk/open_source/openharmony/utils/native/lite/kv_store/src/kvstore_impl_posix/kv_store.c index 6b20a15eb..fd8bd1017 100644 --- a/code/sdk/open_source/openharmony/utils/native/lite/kv_store/src/kvstore_impl_posix/kv_store.c +++ b/code/sdk/open_source/openharmony/utils/native/lite/kv_store/src/kvstore_impl_posix/kv_store.c @@ -29,11 +29,7 @@ #include "ohos_types.h" #include "utils_config.h" -#ifdef XTS_SUPPORT #define KVSTORE_PATH "kvstore" -#else -#define KVSTORE_PATH "user/system/kvstore" -#endif #define MAX_KEY_PATH 256 #define MAX_GET_VALUE_LEN 0x7FFFFFFF static pthread_mutex_t g_kvGlobalMutex = PTHREAD_MUTEX_INITIALIZER; -- 2.17.1