From 6ca115ed53f575700e0c7628ceb2cce8f66a9934 Mon Sep 17 00:00:00 2001 From: mmorozov Date: Thu, 29 May 2025 11:32:36 +0300 Subject: [PATCH] Add new array API Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/IBX9UI?from=project-issue Signed-off-by: mmorozov --- frameworks/js/ani/vibrator/src/vibrator_ani.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frameworks/js/ani/vibrator/src/vibrator_ani.cpp b/frameworks/js/ani/vibrator/src/vibrator_ani.cpp index 47870c3..60a965f 100644 --- a/frameworks/js/ani/vibrator/src/vibrator_ani.cpp +++ b/frameworks/js/ani/vibrator/src/vibrator_ani.cpp @@ -327,10 +327,10 @@ static bool GetPropertyAsDouble(ani_env* env, ani_object obj, const char* proper static bool ParseVibratorCurvePoint(ani_env *env, ani_object pointsArray, uint32_t index, VibratorCurvePoint &point) { - auto array = static_cast(pointsArray); + auto array = static_cast(pointsArray); ani_ref arrayRef; - if (env->Array_Get_Ref(array, index, &arrayRef) != ANI_OK) { - MISC_HILOGE("Array_Get_Ref Fail"); + if (env->Array_Get(array, index, &arrayRef) != ANI_OK) { + MISC_HILOGE("Array_Get Fail"); return false; } ani_double time = 0; @@ -417,10 +417,10 @@ static bool ParsePointsArray(ani_env *env, ani_object parentObject, VibratorEven static bool ParseVibrateEvent(ani_env *env, ani_object eventArray, int32_t index, VibratorEvent &event) { - auto array = static_cast(eventArray); + auto array = static_cast(eventArray); ani_ref arrayRef; - if (env->Array_Get_Ref(array, index, &arrayRef) != ANI_OK) { - MISC_HILOGE("Array_Get_Ref Fail"); + if (env->Array_Get(array, index, &arrayRef) != ANI_OK) { + MISC_HILOGE("Array_Get Fail"); return false; } ani_ref aniEventType; @@ -826,4 +826,4 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) *result = ANI_VERSION_1; return ANI_OK; -} \ No newline at end of file +} -- Gitee