From 0bc238de2666ee90cda92ab2e2d6a6a6d4ebfd55 Mon Sep 17 00:00:00 2001 From: "zhangyafei.echo" Date: Thu, 14 Aug 2025 14:47:24 +0800 Subject: [PATCH] Description:context support log file dir. Sig:SIG_ApplicationFramework Feature or BugFix: Feature Binary Source: No Signed-off-by: zhangyafei.echo Change-Id: I4390348e95fbd444c17ffbeb542405a7166fcbed --- AbilityKit/ability_runtime/application_context.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index ed62cf40293..171f80db271 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -294,6 +294,22 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbility(AbilityBase_Want * AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbilityWithStartOptions(AbilityBase_Want *want, AbilityRuntime_StartOptions *options); +/** + * @brief Obtain the log file directory of the application. + * + * @param buffer A pointer to a buffer that receives the log file directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @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 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 21 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLogFileDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); #ifdef __cplusplus } // extern "C" #endif -- Gitee