From be5ffa1e3705e00311319a18ce60c751c5c8a32f Mon Sep 17 00:00:00 2001 From: HanSY Date: Mon, 14 Jul 2025 09:38:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=9F=E5=BC=83OH=5FResourceManager=5FGetCon?= =?UTF-8?q?figuration=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: HanSY --- .../include/resourcemanager/ohresmgr.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/global/resource_management/include/resourcemanager/ohresmgr.h b/global/resource_management/include/resourcemanager/ohresmgr.h index ea4c2b7a..3012ac34 100644 --- a/global/resource_management/include/resourcemanager/ohresmgr.h +++ b/global/resource_management/include/resourcemanager/ohresmgr.h @@ -410,10 +410,29 @@ ResourceManager_ErrorCode OH_ResourceManager_GetLocalesData(const NativeResource {@link ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED} 9001009 - If failed to access the system resource. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. * @since 12 + * @deprecated since 20 + * @useinstead OH_ResourceManager_GetResourceConfiguration */ ResourceManager_ErrorCode OH_ResourceManager_GetConfiguration(const NativeResourceManager *mgr, ResourceManager_Configuration *configuration); +/** + * @brief Obtains the device configuration. + * + * You need to call the OH_ResourceManager_ReleaseConfiguration() method to release the memory. + * If you use malloc to create a ResourceManager_Configuration object, you also need to call free to release it. + * + * @param mgr Indicates the pointer to {@link NativeResourceManager} + * {@link OH_ResourceManager_InitNativeResourceManager}. + * @param configuration the result write to ResourceManager_Configuration. + * @return {@link SUCCESS} 0 - Success. + {@link ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED} 9001009 - If failed to access the system resource. + {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. + * @since 20 + */ +ResourceManager_ErrorCode OH_ResourceManager_GetResourceConfiguration(const NativeResourceManager *mgr, + ResourceManager_Configuration *configuration); + /** * @brief Release the device configuration. * @param configuration the object need to release. -- Gitee