Skip to content

Commit 66547d8

Browse files
committed
vibrator: cs40l25: Fix compose() dropping primitives
The "<idx>.<volLevel>" write was wrapped in USE_EFFECT_DURATION_POLLING, so builds with use_compound_double_click_effect emitted no primitive tokens to the effect queue. Move the write outside the guard; keep mTotalDuration accounting inside. Change-Id: I2cdb6f9fe8aa2325e0bd2f020c2c69aa40394766
1 parent 2f22774 commit 66547d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

aidl/vibrator/cs40l25/Vibrator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,9 @@ ndk::ScopedAStatus Vibrator::compose(const std::vector<CompositeEffect>& composi
494494
return status;
495495
}
496496

497-
#ifdef USE_EFFECT_DURATION_POLLING
498497
effectBuilder << effectIndex << "." << intensityToVolLevel(e.scale, effectIndex) << ",";
498+
499+
#ifdef USE_EFFECT_DURATION_POLLING
499500
{
500501
const std::scoped_lock<std::mutex> lock(mTotalDurationMutex);
501502
mTotalDuration += mEffectDurations[effectIndex];

0 commit comments

Comments
 (0)