From f19351f3a9a0eecbe27240d960821ce5a6b9cfe6 Mon Sep 17 00:00:00 2001 From: Chase Wu Date: Tue, 3 Jan 2023 15:38:11 +0800 Subject: [PATCH] [DO NOT MERGE] cs40l26: Report the duration time when using DOUBLE_CLICK effect DOUBLE_CLICK is a composed effect, but it uses another function to do the composed process. When using GPI to trigger a composed effect, HAL needs to update the overall duration time to chip. Bug: 263963724 Test: Manully unlock the device Change-Id: I329fbeff69a56fe990b1ca946bdd30199048ef04 --- vibrator/cs40l26/Vibrator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index 0716517..0b26730 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -1508,6 +1508,10 @@ ndk::ScopedAStatus Vibrator::getCompoundDetails(Effect effect, EffectStrength st } *outTimeMs = timeMs; + mFfEffects[WAVEFORM_COMPOSE].replay.length = static_cast(timeMs); + if (mIsDual) { + mFfEffectsDual[WAVEFORM_COMPOSE].replay.length = static_cast(timeMs); + } return ndk::ScopedAStatus::ok(); }