From c693333a89f28a13460e795e70eee2639905d385 Mon Sep 17 00:00:00 2001 From: lvqiang214 Date: Sat, 8 Jul 2023 09:39:34 +0800 Subject: [PATCH] change service id Signed-off-by: lvqiang214 --- llt/hdt/depend_libs/src/file_ex.cpp | 14 ++++++------- patches/systemabilitymgr_samgr.patch | 20 +++++++++---------- sa_profile/{2688.xml => 312.xml} | 2 +- sa_profile/BUILD.gn | 2 +- .../server/trigger_base_type.cpp | 2 +- 5 files changed, 19 insertions(+), 21 deletions(-) rename sa_profile/{2688.xml => 312.xml} (97%) diff --git a/llt/hdt/depend_libs/src/file_ex.cpp b/llt/hdt/depend_libs/src/file_ex.cpp index 65b469c..967a533 100755 --- a/llt/hdt/depend_libs/src/file_ex.cpp +++ b/llt/hdt/depend_libs/src/file_ex.cpp @@ -42,9 +42,9 @@ bool LoadStringFromFile(const string& filePath, string& content) } file.seekg(0, ios::end); - const long fileLength = file.tellg(); + int fileLength = file.tellg(); if (fileLength > MAX_FILE_LENGTH) { - UTILS_LOGD("invalid file length(%{public}ld)!", fileLength); + UTILS_LOGD("invalid file length(%{public}d)", fileLength); return false; } @@ -96,7 +96,7 @@ bool LoadStringFromFd(int fd, string& content) const long fileLength = lseek(fd, 0, SEEK_END); if (fileLength > MAX_FILE_LENGTH) { - UTILS_LOGE("invalid file length(%{public}ld)!", fileLength); + UTILS_LOGE("invalid file length"); return false; } @@ -118,8 +118,7 @@ bool LoadStringFromFd(int fd, string& content) const long len = read(fd, content.data(), fileLength); if (len != fileLength) { - UTILS_LOGE("the length read from file is not equal to fileLength!len:%{public}ld,fileLen:%{public}ld", - len, fileLength); + UTILS_LOGE("the length read from file is not equal to fileLength"); return false; } @@ -173,8 +172,7 @@ bool SaveStringToFd(int fd, const std::string& content) } if (static_cast(len) != content.length()) { - UTILS_LOGE("the length write to file is not equal to fileLength!len:%{public}ld, fileLen:%{public}zu", - len, content.length()); + UTILS_LOGE("the length write to file is not equal to fileLength"); return false; } @@ -227,7 +225,7 @@ bool LoadBufferFromFile(const string& filePath, vector& content) file.seekg(0, std::ios::end); const long fileLength = file.tellg(); if (fileLength > MAX_FILE_LENGTH) { - UTILS_LOGD("invalid file length(%{public}ld)!", fileLength); + UTILS_LOGD("invalid file length"); return false; } diff --git a/patches/systemabilitymgr_samgr.patch b/patches/systemabilitymgr_samgr.patch index 2a9cb32..5bf96cd 100644 --- a/patches/systemabilitymgr_samgr.patch +++ b/patches/systemabilitymgr_samgr.patch @@ -1,4 +1,4 @@ -From 4fa0f24361771089247fdfb63b78c64329b607f7 Mon Sep 17 00:00:00 2001 +From 4a9d29570c3263ff7f30b5d4178b0507f6b868b9 Mon Sep 17 00:00:00 2001 From: lvqiang214 Date: Tue, 4 Jul 2023 22:21:44 +0800 Subject: [PATCH] add intelligent voice service id @@ -9,17 +9,17 @@ Signed-off-by: lvqiang214 1 file changed, 1 insertion(+) diff --git a/interfaces/innerkits/samgr_proxy/include/system_ability_definition.h b/interfaces/innerkits/samgr_proxy/include/system_ability_definition.h -index 9f20be1..5e95bad 100644 +index 9f20be1..681f4a8 100644 --- a/interfaces/innerkits/samgr_proxy/include/system_ability_definition.h +++ b/interfaces/innerkits/samgr_proxy/include/system_ability_definition.h -@@ -158,6 +158,7 @@ enum { - IVIHARDWARE_ADAS_SA_ID = 2602, - IVIHARDWARE_TBOX_SA_ID = 2603, - IVIHARDWARE_CLUSTER_SA_ID = 2604, -+ INTELL_VOICE_SERVICE_ID = 2688, - SUBSYS_KERNEL_SYS_ABILITY_ID_BEGIN = 2700, - SUBSYS_LOCATION_SYS_ABILITY_ID_BEGIN = 2800, - LOCATION_GEO_CONVERT_SA_ID = 2801, +@@ -41,6 +41,7 @@ enum { + SUBSYS_AI_SYS_ABILITY_ID_BEGIN = 300, + SUBSYS_AI_DS_SYS_ABILITY_ID = 310, + AIDISPATCHER_ENGINE_SERVICE = 311, ++ INTELL_VOICE_SERVICE_ID = 312, + SUBSYS_APPEXECFWK_SYS_ABILITY_ID_BEGIN = 400, + BUNDLE_MGR_SERVICE_SYS_ABILITY_ID = 401, + DISTRIBUTED_BUNDLE_MGR_SERVICE_SYS_ABILITY_ID = 402, -- 2.34.1 diff --git a/sa_profile/2688.xml b/sa_profile/312.xml similarity index 97% rename from sa_profile/2688.xml rename to sa_profile/312.xml index b991862..26ffec6 100755 --- a/sa_profile/2688.xml +++ b/sa_profile/312.xml @@ -16,7 +16,7 @@ intell_voice_service - 2688 + 312 /system/lib64/libintell_voice_server.z.so true false diff --git a/sa_profile/BUILD.gn b/sa_profile/BUILD.gn index bc8f697..5fff7ab 100755 --- a/sa_profile/BUILD.gn +++ b/sa_profile/BUILD.gn @@ -14,6 +14,6 @@ import("//build/ohos/sa_profile/sa_profile.gni") ohos_sa_profile("intell_voice_service_sa_profile") { - sources = [ "2688.xml" ] + sources = [ "312.xml" ] part_name = "intelligent_voice_framework" } diff --git a/services/intell_voice_trigger/server/trigger_base_type.cpp b/services/intell_voice_trigger/server/trigger_base_type.cpp index ba19130..b1c4f94 100755 --- a/services/intell_voice_trigger/server/trigger_base_type.cpp +++ b/services/intell_voice_trigger/server/trigger_base_type.cpp @@ -59,7 +59,7 @@ void TriggerModel::Print() INTELL_VOICE_LOG_INFO("trigger model uuid:%{public}d", uuid_); INTELL_VOICE_LOG_INFO("trigger model vendor uuid:%{public}d", vendorUuid_); INTELL_VOICE_LOG_INFO("trigger model version:%{public}d", version_); - INTELL_VOICE_LOG_INFO("trigger model data size:%{public}lu", data_.size()); + INTELL_VOICE_LOG_INFO("trigger model data size:%{public}zu", data_.size()); } } // namespace IntellVoiceTrigger } // namespace OHOS \ No newline at end of file