From f1895005754d3a497552b8cfdc307f76e885e234 Mon Sep 17 00:00:00 2001 From: yangzk Date: Sun, 8 Sep 2024 17:18:49 +0800 Subject: [PATCH] =?UTF-8?q?Description:=20=E6=96=B0=E5=A2=9EapplicationCon?= =?UTF-8?q?text=E9=94=99=E8=AF=AF=E7=A0=81ABILITY=5FRUNTIME=5FERROR=5FCODE?= =?UTF-8?q?=5FCONTEXT=5FNOT=5FEXIST=20IssueNo:=20#IAPOX6=20Sig:=20SIG=5FAp?= =?UTF-8?q?plicationFramework=20Feature=20or=20Bugfix:=20Bugfix=20Binary?= =?UTF-8?q?=20Source:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangzk Change-Id: I25509e923f6ebaeffaec07ee0bdc852b60762ee5 --- AbilityKit/ability_runtime/ability_runtime_common.h | 4 +++- AbilityKit/ability_runtime/application_context.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AbilityKit/ability_runtime/ability_runtime_common.h b/AbilityKit/ability_runtime/ability_runtime_common.h index d6220b080..e4cf556e4 100644 --- a/AbilityKit/ability_runtime/ability_runtime_common.h +++ b/AbilityKit/ability_runtime/ability_runtime_common.h @@ -51,6 +51,8 @@ typedef enum { ABILITY_RUNTIME_ERROR_CODE_NO_ERROR = 0, /** @error Invalid parameters. */ ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID = 401, + /** @error The context does not exist. */ + ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST = 16000011, } AbilityRuntime_ErrorCode; #ifdef __cplusplus @@ -58,4 +60,4 @@ typedef enum { #endif /** @} */ -#endif //ABILITY_RUNTIME_COMMON_H +#endif // ABILITY_RUNTIME_COMMON_H diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 374a99bd8..1ba53503d 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -57,6 +57,7 @@ extern "C" { * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. * @since 13 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCacheDir( @@ -69,6 +70,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCacheDir( * @return The error code. * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the areaMode is null. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. * @since 13 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetAreaMode(AbilityRuntime_AreaMode* areaMode); @@ -84,6 +86,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetAreaMode(Ability * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. * @since 13 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetBundleName(