From 17e05fd3986176ae139d59dd1c937c01cca0a5b9 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 9fe86ee..1bc0bdb 100644 --- a/frameworks/js/ani/vibrator/src/vibrator_ani.cpp +++ b/frameworks/js/ani/vibrator/src/vibrator_ani.cpp @@ -326,10 +326,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; @@ -416,10 +416,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; @@ -813,4 +813,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