From 5f05447596065aed09f506a5c31e84f45156558a Mon Sep 17 00:00:00 2001 From: lanhaoyu Date: Wed, 10 Sep 2025 17:42:14 +0800 Subject: [PATCH] fix permission denied Signed-off-by: lanhaoyu --- interfaces/kits/native/bundle/src/native_interface_bundle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interfaces/kits/native/bundle/src/native_interface_bundle.cpp b/interfaces/kits/native/bundle/src/native_interface_bundle.cpp index 8c5434ffdc..08cbc7d362 100644 --- a/interfaces/kits/native/bundle/src/native_interface_bundle.cpp +++ b/interfaces/kits/native/bundle/src/native_interface_bundle.cpp @@ -32,6 +32,7 @@ const size_t CHAR_MIN_LENGTH = 1; const size_t CHAR_MAX_LENGTH = 10240; const size_t MAX_ALLOWED_SIZE = 1024 * 1024; const size_t ARRAY_MAX_LENGTH = 1024; +const size_t ERR_APPEXECFWK_PERMISSION_DENIED = 8521226; } // Helper function to release char* memory @@ -556,7 +557,7 @@ BundleManager_ErrorCode OH_NativeBundle_GetAbilityResourceInfo( std::vector launcherAbilityResourceInfoArr; if (bundleMgrProxyNative.GetLauncherAbilityResourceInfoNative(fileTypeStr, launcherAbilityResourceInfoArr) == - BUNDLE_MANAGER_ERROR_CODE_PERMISSION_DENIED) { + ERR_APPEXECFWK_PERMISSION_DENIED) { APP_LOGE("failed to get launcher Ability Resource Info Arr because of permission denied"); return BUNDLE_MANAGER_ERROR_CODE_PERMISSION_DENIED; } -- Gitee