From 4407235211c9285a8b0715555214a2ee359a5f24 Mon Sep 17 00:00:00 2001 From: jiachong Date: Tue, 10 Jun 2025 19:44:13 +0800 Subject: [PATCH] Provide pandafile type descriptors for union types Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICDSWO?from=project-issue Signed-off-by: jiachong Change-Id: I6c3b832f59a3f9dc8c0b28654c564888e41286ef --- frameworks/js/ani/vibrator/src/vibrator_ani.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frameworks/js/ani/vibrator/src/vibrator_ani.cpp b/frameworks/js/ani/vibrator/src/vibrator_ani.cpp index 9fe86ee..2462403 100644 --- a/frameworks/js/ani/vibrator/src/vibrator_ani.cpp +++ b/frameworks/js/ani/vibrator/src/vibrator_ani.cpp @@ -802,7 +802,16 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) } std::array methods = { - ani_native_function {"startVibrationSync", nullptr, reinterpret_cast(StartVibrationSync)}, + const char* OHOS_VIBRATOR_PREFIX = "@ohos.vibrator."; + ani_native_function { + "startVibrationSync", + "X{C{" OHOS_VIBRATOR_PREFIX "VibrateTime}" + "{" OHOS_VIBRATOR_PREFIX "VibratePreset}" + "{" OHOS_VIBRATOR_PREFIX "VibrateFromFile}" + "{" OHOS_VIBRATOR_PREFIX "VibrateFromPattern}}C{" + OHOS_VIBRATOR_PREFIX "VibrateAttribute}:", + reinterpret_cast(StartVibrationSync) + }, ani_native_function {"isSupportEffectInterally", nullptr, reinterpret_cast(IsSupportEffectInterally)}, }; -- Gitee