diff --git a/services/core/jni/com_android_server_VibratorService.cpp b/services/core/jni/com_android_server_VibratorService.cpp index 612a1e7074f97..dcff5a11aca05 100644 --- a/services/core/jni/com_android_server_VibratorService.cpp +++ b/services/core/jni/com_android_server_VibratorService.cpp @@ -338,7 +338,7 @@ static jlong vibratorPerformEffect(JNIEnv* env, jclass, jlong effect, jlong stre if (auto hal = getHal()) { int32_t lengthMs; sp effectCallback = new AidlVibratorCallback(env, vibration); - aidl::Effect effectType(static_cast(strength)); + aidl::Effect effectType(static_cast(effect)); aidl::EffectStrength effectStrength(static_cast(strength)); auto status = hal->call(&aidl::IVibrator::perform, effectType, effectStrength, effectCallback, &lengthMs);