diff --git a/vibrator/Android.bp b/vibrator/Android.bp index d2b6489..60108f3 100644 --- a/vibrator/Android.bp +++ b/vibrator/Android.bp @@ -12,7 +12,6 @@ cc_library_shared { "libcutils", "libutils", "liblog", - "libqtivibratoreffect", "libbinder_ndk", "android.hardware.vibrator-ndk_platform", ], diff --git a/vibrator/Vibrator.cpp b/vibrator/Vibrator.cpp index c7df267..8f397c8 100644 --- a/vibrator/Vibrator.cpp +++ b/vibrator/Vibrator.cpp @@ -39,9 +39,6 @@ #include #include "include/Vibrator.h" -#ifdef USE_EFFECT_STREAM -#include "effect.h" -#endif namespace aidl { namespace android { @@ -184,9 +181,6 @@ int InputFFDevice::play(int effectId, uint32_t timeoutMs, long *playLengthMs) { struct input_event play; int16_t data[CUSTOM_DATA_LEN] = {0, 0, 0}; int ret; -#ifdef USE_EFFECT_STREAM - const struct effect_stream *stream; -#endif /* For QMAA compliance, return OK even if vibrator device doesn't exist */ if (mVibraFd == INVALID_VALUE) { @@ -213,13 +207,6 @@ int InputFFDevice::play(int effectId, uint32_t timeoutMs, long *playLengthMs) { effect.u.periodic.magnitude = mCurrMagnitude; effect.u.periodic.custom_data = data; effect.u.periodic.custom_len = sizeof(int16_t) * CUSTOM_DATA_LEN; -#ifdef USE_EFFECT_STREAM - stream = get_effect_stream(effectId); - if (stream != NULL) { - effect.u.periodic.custom_data = (int16_t *)stream; - effect.u.periodic.custom_len = sizeof(*stream); - } -#endif } else { effect.type = FF_CONSTANT; effect.u.constant.level = mCurrMagnitude; @@ -238,10 +225,6 @@ int InputFFDevice::play(int effectId, uint32_t timeoutMs, long *playLengthMs) { mCurrAppId = effect.id; if (effectId != INVALID_VALUE && playLengthMs != NULL) { *playLengthMs = data[1] * 1000 + data[2]; -#ifdef USE_EFFECT_STREAM - if (stream != NULL && stream->play_rate_hz != 0) - *playLengthMs = ((stream->length * 1000) / stream->play_rate_hz) + 1; -#endif } play.value = 1;