From af2a614927634c2adbc7c9a2d6bcfe559807bfd2 Mon Sep 17 00:00:00 2001 From: linan24 Date: Fri, 15 Aug 2025 10:56:20 +0800 Subject: [PATCH] blue yellow code sync Signed-off-by: linan24 --- frameworks/native/backup_ext/include/ext_extension.h | 2 +- interfaces/common/src/sandbox_helper.cpp | 1 - interfaces/innerkits/native/file_uri/include/file_uri.h | 2 +- .../backup_sa/include/module_ipc/svc_backup_connection.h | 2 +- .../backup_sa/src/module_ipc/svc_backup_connection.cpp | 2 +- services/backup_sa/src/module_ipc/svc_session_manager.cpp | 8 +++----- tests/mock/b_radar/include/hisysevent_mock.h | 2 +- tests/mock/module_ipc/include/svc_extension_proxy_mock.h | 2 +- tests/mock/module_ipc/include/svc_session_manager_mock.h | 2 +- tests/mock/module_ipc/svc_extension_proxy_mock.cpp | 2 +- tests/mock/module_ipc/svc_session_manager_mock.cpp | 2 +- tests/mock/module_ipc/svc_session_manager_throw_mock.cpp | 2 +- tests/mock/module_ipc/svc_session_manager_throw_mock.h | 2 +- .../backup_api/backup_impl/include/ext_extension_mock.h | 2 +- tests/unittests/backup_ext/ext_extension_test.cpp | 2 +- tests/unittests/backup_utils/b_filesystem/b_dir_test.cpp | 2 +- utils/include/b_error/b_error.h | 2 +- utils/include/b_filesystem/b_dir.h | 2 +- utils/include/b_filesystem/b_file.h | 2 +- utils/include/b_utils/b_time.h | 2 +- utils/src/b_filesystem/b_dir.cpp | 2 +- utils/src/b_filesystem/b_file.cpp | 2 +- utils/src/b_utils/b_time.cpp | 2 +- 23 files changed, 24 insertions(+), 27 deletions(-) diff --git a/frameworks/native/backup_ext/include/ext_extension.h b/frameworks/native/backup_ext/include/ext_extension.h index ac4246976..51a12dd34 100644 --- a/frameworks/native/backup_ext/include/ext_extension.h +++ b/frameworks/native/backup_ext/include/ext_extension.h @@ -384,13 +384,13 @@ private: void OnRestoreExFinish(); void DoBackupStart(); void DoBackupEnd(); + void UpdateTarStat(uint64_t tarFileSize); void CalculateDataSizeTask(const string &config); void DoBackUpTask(const string &config); TarMap convertFileToBigFiles(std::map files); void PreDealExcludes(std::vector &excludes); template map MatchFiles(map files, vector endExcludes); - void UpdateTarStat(uint64_t tarFileSize); void HandleExtDisconnect(bool isAppResultReport, ErrCode errCode); bool HandleGetExtOnRelease(); diff --git a/interfaces/common/src/sandbox_helper.cpp b/interfaces/common/src/sandbox_helper.cpp index d0a2e6f55..f54ee806c 100644 --- a/interfaces/common/src/sandbox_helper.cpp +++ b/interfaces/common/src/sandbox_helper.cpp @@ -537,7 +537,6 @@ bool SandboxHelper::IsValidPath(const std::string &filePath) bool SandboxHelper::CheckValidPath(const std::string &filePath) { if (filePath.empty() || filePath.size() >= PATH_MAX) { - LOGE("filePath is invalid, size = %{public}zu", filePath.size()); return false; } diff --git a/interfaces/innerkits/native/file_uri/include/file_uri.h b/interfaces/innerkits/native/file_uri/include/file_uri.h index 1f8f50410..8ae2f8a11 100644 --- a/interfaces/innerkits/native/file_uri/include/file_uri.h +++ b/interfaces/innerkits/native/file_uri/include/file_uri.h @@ -26,8 +26,8 @@ class FileUri { public: std::string GetName(); std::string GetPath(); - std::string GetRealPathBySA(const std::string &targetBundleName = ""); std::string GetRealPath(); + std::string GetRealPathBySA(const std::string &targetBundleName = ""); std::string ToString(); std::string GetFullDirectoryUri(); bool IsRemoteUri(); diff --git a/services/backup_sa/include/module_ipc/svc_backup_connection.h b/services/backup_sa/include/module_ipc/svc_backup_connection.h index 305a40b99..3d604992c 100644 --- a/services/backup_sa/include/module_ipc/svc_backup_connection.h +++ b/services/backup_sa/include/module_ipc/svc_backup_connection.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/services/backup_sa/src/module_ipc/svc_backup_connection.cpp b/services/backup_sa/src/module_ipc/svc_backup_connection.cpp index 6ca871b1d..1d7804cca 100644 --- a/services/backup_sa/src/module_ipc/svc_backup_connection.cpp +++ b/services/backup_sa/src/module_ipc/svc_backup_connection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/services/backup_sa/src/module_ipc/svc_session_manager.cpp b/services/backup_sa/src/module_ipc/svc_session_manager.cpp index 07545697b..18af5a9fd 100644 --- a/services/backup_sa/src/module_ipc/svc_session_manager.cpp +++ b/services/backup_sa/src/module_ipc/svc_session_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -236,7 +236,7 @@ bool SvcSessionManager::OnBundleFileReady(const string &bundleName, const string return true; } } - HILOGD("End, bundleName name is:%{public}s", bundleName.c_str()); + HILOGD("End, bundleName name is:%{private}s", bundleName.c_str()); return false; } @@ -512,7 +512,6 @@ bool SvcSessionManager::GetSchedBundleName(string &bundleName) { unique_lock lock(lock_); if (extConnectNum_ >= BConstants::EXT_CONNECT_MAX_COUNT) { - HILOGE("Sched bundle count is too many"); return false; } @@ -741,7 +740,6 @@ bool SvcSessionManager::IsOnAllBundlesFinished() bool SvcSessionManager::IsOnOnStartSched() { - HILOGI("Begin"); shared_lock lock(lock_); if (!impl_.clientToken) { HILOGE("IsOnOnStartSched error, No caller token was specified"); @@ -750,7 +748,7 @@ bool SvcSessionManager::IsOnOnStartSched() if (impl_.isBackupStart && impl_.backupExtNameMap.size()) { return true; } - HILOGI("End"); + return false; } diff --git a/tests/mock/b_radar/include/hisysevent_mock.h b/tests/mock/b_radar/include/hisysevent_mock.h index c7946085b..37075841d 100644 --- a/tests/mock/b_radar/include/hisysevent_mock.h +++ b/tests/mock/b_radar/include/hisysevent_mock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/mock/module_ipc/include/svc_extension_proxy_mock.h b/tests/mock/module_ipc/include/svc_extension_proxy_mock.h index 22a484e0e..e2ee42d9a 100644 --- a/tests/mock/module_ipc/include/svc_extension_proxy_mock.h +++ b/tests/mock/module_ipc/include/svc_extension_proxy_mock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License") = 0; * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/mock/module_ipc/include/svc_session_manager_mock.h b/tests/mock/module_ipc/include/svc_session_manager_mock.h index 4c4a3a19b..9588ac367 100644 --- a/tests/mock/module_ipc/include/svc_session_manager_mock.h +++ b/tests/mock/module_ipc/include/svc_session_manager_mock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License") = 0; * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/mock/module_ipc/svc_extension_proxy_mock.cpp b/tests/mock/module_ipc/svc_extension_proxy_mock.cpp index 75891ebe2..63d6792fb 100644 --- a/tests/mock/module_ipc/svc_extension_proxy_mock.cpp +++ b/tests/mock/module_ipc/svc_extension_proxy_mock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/mock/module_ipc/svc_session_manager_mock.cpp b/tests/mock/module_ipc/svc_session_manager_mock.cpp index c1862dc6c..2cc861333 100644 --- a/tests/mock/module_ipc/svc_session_manager_mock.cpp +++ b/tests/mock/module_ipc/svc_session_manager_mock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/mock/module_ipc/svc_session_manager_throw_mock.cpp b/tests/mock/module_ipc/svc_session_manager_throw_mock.cpp index e144e43d4..1fa56ea3b 100644 --- a/tests/mock/module_ipc/svc_session_manager_throw_mock.cpp +++ b/tests/mock/module_ipc/svc_session_manager_throw_mock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/mock/module_ipc/svc_session_manager_throw_mock.h b/tests/mock/module_ipc/svc_session_manager_throw_mock.h index f183a662a..8cd651ca7 100644 --- a/tests/mock/module_ipc/svc_session_manager_throw_mock.h +++ b/tests/mock/module_ipc/svc_session_manager_throw_mock.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Huawei Device Co., Ltd. + * Copyright (C) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/unittests/backup_api/backup_impl/include/ext_extension_mock.h b/tests/unittests/backup_api/backup_impl/include/ext_extension_mock.h index 38411a68e..cf98ed625 100644 --- a/tests/unittests/backup_api/backup_impl/include/ext_extension_mock.h +++ b/tests/unittests/backup_api/backup_impl/include/ext_extension_mock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/unittests/backup_ext/ext_extension_test.cpp b/tests/unittests/backup_ext/ext_extension_test.cpp index 4580a54b2..ee3eb4a61 100644 --- a/tests/unittests/backup_ext/ext_extension_test.cpp +++ b/tests/unittests/backup_ext/ext_extension_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/tests/unittests/backup_utils/b_filesystem/b_dir_test.cpp b/tests/unittests/backup_utils/b_filesystem/b_dir_test.cpp index c1bd86ca0..8337ae6a8 100644 --- a/tests/unittests/backup_utils/b_filesystem/b_dir_test.cpp +++ b/tests/unittests/backup_utils/b_filesystem/b_dir_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/utils/include/b_error/b_error.h b/utils/include/b_error/b_error.h index bf4fba516..095ee1419 100644 --- a/utils/include/b_error/b_error.h +++ b/utils/include/b_error/b_error.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/utils/include/b_filesystem/b_dir.h b/utils/include/b_filesystem/b_dir.h index c4d89d1c8..9c5f236a0 100644 --- a/utils/include/b_filesystem/b_dir.h +++ b/utils/include/b_filesystem/b_dir.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/utils/include/b_filesystem/b_file.h b/utils/include/b_filesystem/b_file.h index 27fe5ce36..6245c7323 100644 --- a/utils/include/b_filesystem/b_file.h +++ b/utils/include/b_filesystem/b_file.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/utils/include/b_utils/b_time.h b/utils/include/b_utils/b_time.h index 8a995bdf4..a4989a80f 100644 --- a/utils/include/b_utils/b_time.h +++ b/utils/include/b_utils/b_time.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/utils/src/b_filesystem/b_dir.cpp b/utils/src/b_filesystem/b_dir.cpp index a725c3f09..ca6638f09 100644 --- a/utils/src/b_filesystem/b_dir.cpp +++ b/utils/src/b_filesystem/b_dir.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/utils/src/b_filesystem/b_file.cpp b/utils/src/b_filesystem/b_file.cpp index f89e7e4f6..7e8d57e72 100644 --- a/utils/src/b_filesystem/b_file.cpp +++ b/utils/src/b_filesystem/b_file.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/utils/src/b_utils/b_time.cpp b/utils/src/b_utils/b_time.cpp index adaa98796..23cd673c2 100644 --- a/utils/src/b_utils/b_time.cpp +++ b/utils/src/b_utils/b_time.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -- Gitee